当前位置: 首页>>代码示例>>C++>>正文


C++ ProcessorListItem类代码示例

本文整理汇总了C++中ProcessorListItem的典型用法代码示例。如果您正苦于以下问题:C++ ProcessorListItem类的具体用法?C++ ProcessorListItem怎么用?C++ ProcessorListItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ProcessorListItem类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getListItemForYPos

void ProcessorList::mouseDrag(const MouseEvent& e)
{

	if (e.getMouseDownX() < getWidth() && !(isDragging))
	{

		ProcessorListItem* listItem = getListItemForYPos(e.getMouseDownY());

		if (listItem != 0)
		{

			if (!listItem->hasSubItems())
			{
				isDragging = true;

				String b = listItem->getName();

				const String dragDescription = b;

				//std::cout << dragDescription << std::endl;

				if (dragDescription.isNotEmpty())
				{
					DragAndDropContainer* const dragContainer
						= DragAndDropContainer::findParentDragContainerFor(this);

					if (dragContainer != 0)
					{
						//pos.setSize (pos.getWidth(), 10);

						Image dragImage(Image::ARGB, 100, 15, true);

						Graphics g(dragImage);
						g.setColour(findColour(listItem->colorId));
						g.fillAll();
						g.setColour(Colours::white);
						g.setFont(14);
						g.drawSingleLineText(listItem->getName(),10,12);//,75,15,Justification::centredRight,true);

						dragImage.multiplyAllAlphas(0.6f);

						Point<int> imageOffset(20,10);

						//See ProcessorGraph::createProcesorFromDescription for description info
						Array<var> dragData;
						dragData.add(true);
						dragData.add(dragDescription);
						dragData.add(listItem->processorType);
						dragData.add(listItem->processorId);
						dragData.add(listItem->getParentName());

						dragContainer->startDragging(dragData, this,
								dragImage, true, &imageOffset);
					}
				}
			}
		}
	}

}
开发者ID:LabPF,项目名称:plugin-GUI,代码行数:60,代码来源:ProcessorList.cpp

示例2: getListItemForYPos

void ProcessorList::toggleState()
{
    ProcessorListItem* fli = getListItemForYPos(0);
    fli->reverseOpenState();
    AccessClass::getUIComponent()->childComponentChanged();
    repaint();
}
开发者ID:ArmandNM,项目名称:GUI,代码行数:7,代码来源:ProcessorList.cpp

示例3: getListItemForYPos

void ProcessorList::mouseDrag(const MouseEvent& e) 
{

	if (e.getMouseDownX() < getWidth()-getScrollBarWidth() && !(isDragging))
	{

		ProcessorListItem* fli = getListItemForYPos(e.getMouseDownY());

		if (fli != 0)
		{

			if (!fli->hasSubItems())
			{
				isDragging = true;

				String b = fli->getParentName();
				b += "/";
				b += fli->getName();

				const String dragDescription = b;

				//std::cout << dragDescription << std::endl;

				if (dragDescription.isNotEmpty())
				{
					DragAndDropContainer* const dragContainer
						= DragAndDropContainer::findParentDragContainerFor (this);

					if (dragContainer != 0)
					{
						//pos.setSize (pos.getWidth(), 10);

						Image dragImage (Image::ARGB, 100, 15, true);

						Graphics g(dragImage);
						g.setColour (fli->color);
						g.fillAll();
						g.setColour(Colours::white);
						g.setFont(14);
						g.drawSingleLineText(fli->getName(),10,12);//,75,15,Justification::centredRight,true);

						dragImage.multiplyAllAlphas(0.6f);

						Point<int> imageOffset (20,10);
						dragContainer->startDragging(dragDescription, this,
											         dragImage, true, &imageOffset);
					}
				}
			}
		}
	}

	mouseDragInCanvas(e);
}
开发者ID:karlssonm,项目名称:GUI,代码行数:54,代码来源:ProcessorList.cpp

示例4: isDragging

ProcessorList::ProcessorList() : isDragging(false),
                           itemHeight(32),
                           subItemHeight(22),
                           totalHeight(800),
                           xBuffer(1),
                           yBuffer(1)
{

	ProcessorListItem* sources = new ProcessorListItem("Sources");
	sources->addSubItem(new ProcessorListItem("Intan Demo Board"));
	sources->addSubItem(new ProcessorListItem("Signal Generator"));
	//sources->addSubItem(new ProcessorListItem("Custom FPGA"));
	//sources->addSubItem(new ProcessorListItem("File Reader"));
	sources->addSubItem(new ProcessorListItem("Event Generator"));

	ProcessorListItem* filters = new ProcessorListItem("Filters");
	filters->addSubItem(new ProcessorListItem("Bandpass Filter"));
	//filters->addSubItem(new ProcessorListItem("Resampler"));
	//filters->addSubItem(new ProcessorListItem("Spike Detector"));

	ProcessorListItem* sinks = new ProcessorListItem("Sinks");
	sinks->addSubItem(new ProcessorListItem("LFP Viewer"));
	//sinks->addSubItem(new ProcessorListItem("Spike Display"));
	sinks->addSubItem(new ProcessorListItem("WiFi Output"));

	//ProcessorListItem* utilities = new ProcessorListItem("Utilities");
	//utilities->addSubItem(new ProcessorListItem("Splitter"));
	//utilities->addSubItem(new ProcessorListItem("Merger"));

	baseItem = new ProcessorListItem("Processors");
	baseItem->addSubItem(sources);
	baseItem->addSubItem(filters);
	baseItem->addSubItem(sinks);
	//baseItem->addSubItem(utilities);

	// set parent names / colors
	baseItem->setParentName("Processors");

	for (int n = 0; n < baseItem->getNumSubItems(); n++)
	{

		const String category = baseItem->getSubItem(n)->getName();
		baseItem->getSubItem(n)->setParentName(category);

			for (int m = 0; m < baseItem->getSubItem(n)->getNumSubItems(); m++)
			{

				baseItem->getSubItem(n)->getSubItem(m)->setParentName(category);// = category;

			}
			
	}

}
开发者ID:karlssonm,项目名称:GUI,代码行数:54,代码来源:ProcessorList.cpp

示例5: isDragging

ProcessorList::ProcessorList()
    : isDragging(false), totalHeight(800), itemHeight(32), subItemHeight(22),
      xBuffer(1), yBuffer(1)
{

    listFontLight = Font("Default Light", 25, Font::plain);
    listFontPlain = Font("Default", 20, Font::plain);

    setColour(PROCESSOR_COLOR, Colour(59, 59, 59));
    setColour(FILTER_COLOR, Colour(0, 174, 239));
    setColour(SINK_COLOR, Colour(0, 166, 81));
    setColour(SOURCE_COLOR, Colour(241, 90, 41));
    setColour(UTILITY_COLOR, Colour(147, 149, 152));

    ProcessorListItem* sources = new ProcessorListItem("Sources");
    //sources->addSubItem(new ProcessorListItem("RHA2000-EVAL"));
    //sources->addSubItem(new ProcessorListItem("Signal Generator"));
    //sources->addSubItem(new ProcessorListItem("Custom FPGA"));
    sources->addSubItem(new ProcessorListItem("Rhythm FPGA"));
#if JUCE_WINDOWS // eCube module currently only available for Windows
#ifdef ECUBE_COMPILE
    sources->addSubItem(new ProcessorListItem("eCube")); // Added by Michael Borisov
#endif
#endif
    sources->addSubItem(new ProcessorListItem("File Reader"));
#ifdef ZEROMQ
    sources->addSubItem(new ProcessorListItem("Network Events"));
#endif
    sources->addSubItem(new ProcessorListItem("Serial Port"));
    //sources->addSubItem(new ProcessorListItem("Event Generator"));

    ProcessorListItem* filters = new ProcessorListItem("Filters");
    filters->addSubItem(new ProcessorListItem("Bandpass Filter"));
    filters->addSubItem(new ProcessorListItem("Spike Detector"));
    filters->addSubItem(new ProcessorListItem("Spike Sorter"));
    //filters->addSubItem(new ProcessorListItem("Resampler"));
    filters->addSubItem(new ProcessorListItem("Phase Detector"));
    //filters->addSubItem(new ProcessorListItem("Digital Ref"));
    filters->addSubItem(new ProcessorListItem("Channel Map"));
    filters->addSubItem(new ProcessorListItem("Common Avg Ref"));
    filters->addSubItem(new ProcessorListItem("Rectifier"));
    //filters->addSubItem(new ProcessorListItem("Eye Tracking"));


    ProcessorListItem* sinks = new ProcessorListItem("Sinks");
    sinks->addSubItem(new ProcessorListItem("LFP Viewer"));
    //sinks->addSubItem(new ProcessorListItem("LFP Trig. Avg."));
    sinks->addSubItem(new ProcessorListItem("Spike Viewer"));
    sinks->addSubItem(new ProcessorListItem("PSTH"));
    //sinks->addSubItem(new ProcessorListItem("Network Sink"));
    //sinks->addSubItem(new ProcessorListItem("WiFi Output"));
    sinks->addSubItem(new ProcessorListItem("Arduino Output"));
    // sinks->addSubItem(new ProcessorListItem("FPGA Output"));
    sinks->addSubItem(new ProcessorListItem("Pulse Pal"));
#ifdef ZEROMQ
    sinks->addSubItem(new ProcessorListItem("Event Broadcaster"));
#endif

    ProcessorListItem* utilities = new ProcessorListItem("Utilities");
    utilities->addSubItem(new ProcessorListItem("Splitter"));
    utilities->addSubItem(new ProcessorListItem("Merger"));
    utilities->addSubItem(new ProcessorListItem("Record Control"));
    //utilities->addSubItem(new ProcessorListItem("Advancers"));

    baseItem = new ProcessorListItem("Processors");
    baseItem->addSubItem(sources);
    baseItem->addSubItem(filters);
    baseItem->addSubItem(sinks);
    baseItem->addSubItem(utilities);

    // set parent names / colors
    baseItem->setParentName("Processors");

    for (int n = 0; n < baseItem->getNumSubItems(); n++)
    {

        const String category = baseItem->getSubItem(n)->getName();
        baseItem->getSubItem(n)->setParentName(category);

        for (int m = 0; m < baseItem->getSubItem(n)->getNumSubItems(); m++)
        {

            baseItem->getSubItem(n)->getSubItem(m)->setParentName(category);// = category;

        }

    }

}
开发者ID:ArmandNM,项目名称:GUI,代码行数:89,代码来源:ProcessorList.cpp

示例6: isDragging

ProcessorList::ProcessorList() : isDragging(false),
                           itemHeight(32),
                           subItemHeight(22),
                           totalHeight(800),
                           xBuffer(1),
                           yBuffer(1)
{


	setColour(PROCESSOR_COLOR, Colour(59, 59, 59));
	setColour(FILTER_COLOR, Colour(41, 76, 158));//Colour(255, 89, 0));
	setColour(SINK_COLOR, Colour(93, 125, 199));//Colour(255, 149, 0));
	setColour(SOURCE_COLOR, Colour(48, 67, 112)); //Colour(255, 0, 0));
	setColour(UTILITY_COLOR, Colour(90, 80, 80));

	ProcessorListItem* sources = new ProcessorListItem("Sources");
	sources->addSubItem(new ProcessorListItem("Intan Demo Board"));
	sources->addSubItem(new ProcessorListItem("Signal Generator"));
	sources->addSubItem(new ProcessorListItem("Custom FPGA"));
	sources->addSubItem(new ProcessorListItem("File Reader"));
	sources->addSubItem(new ProcessorListItem("Event Generator"));

	ProcessorListItem* filters = new ProcessorListItem("Filters");
	filters->addSubItem(new ProcessorListItem("Bandpass Filter"));
	//filters->addSubItem(new ProcessorListItem("Resampler"));
	filters->addSubItem(new ProcessorListItem("Spike Detector"));

	ProcessorListItem* sinks = new ProcessorListItem("Sinks");
	sinks->addSubItem(new ProcessorListItem("LFP Viewer"));
	sinks->addSubItem(new ProcessorListItem("Spike Viewer"));
	sinks->addSubItem(new ProcessorListItem("WiFi Output"));
	sinks->addSubItem(new ProcessorListItem("Arduino Output"));

	ProcessorListItem* utilities = new ProcessorListItem("Utilities");
	utilities->addSubItem(new ProcessorListItem("Splitter"));
	utilities->addSubItem(new ProcessorListItem("Merger"));

	baseItem = new ProcessorListItem("Processors");
	baseItem->addSubItem(sources);
	baseItem->addSubItem(filters);
	baseItem->addSubItem(sinks);
	baseItem->addSubItem(utilities);

	// set parent names / colors
	baseItem->setParentName("Processors");

	for (int n = 0; n < baseItem->getNumSubItems(); n++)
	{

		const String category = baseItem->getSubItem(n)->getName();
		baseItem->getSubItem(n)->setParentName(category);

			for (int m = 0; m < baseItem->getSubItem(n)->getNumSubItems(); m++)
			{

				baseItem->getSubItem(n)->getSubItem(m)->setParentName(category);// = category;

			}
			
	}

}
开发者ID:Labmind,项目名称:GUI,代码行数:62,代码来源:ProcessorList.cpp

示例7: isDragging

ProcessorList::ProcessorList()
    : isDragging(false), totalHeight(800), itemHeight(32), subItemHeight(22),
      xBuffer(1), yBuffer(1)
{

    listFontLight = Font("Default Light", 25, Font::plain);
    listFontPlain = Font("Default", 20, Font::plain);

    setColour(PROCESSOR_COLOR, Colour(59, 59, 59));
    setColour(FILTER_COLOR, Colour(0, 174, 239));
    setColour(SINK_COLOR, Colour(0, 166, 81));
    setColour(SOURCE_COLOR, Colour(241, 90, 41));
    setColour(UTILITY_COLOR, Colour(147, 149, 152));

    ProcessorListItem* sources = new ProcessorListItem("Sources");
    //sources->addSubItem(new ProcessorListItem("RHA2000-EVAL"));
    //sources->addSubItem(new ProcessorListItem("Signal Generator"));
    //sources->addSubItem(new ProcessorListItem("Custom FPGA"));
    sources->addSubItem(new ProcessorListItem("Rhythm FPGA"));
    sources->addSubItem(new ProcessorListItem("File Reader"));
    //sources->addSubItem(new ProcessorListItem("Event Generator"));

    ProcessorListItem* filters = new ProcessorListItem("Filters");
    filters->addSubItem(new ProcessorListItem("Bandpass Filter"));
    //filters->addSubItem(new ProcessorListItem("Event Detector"));
    filters->addSubItem(new ProcessorListItem("Spike Detector"));
    //filters->addSubItem(new ProcessorListItem("Resampler"));
    filters->addSubItem(new ProcessorListItem("Phase Detector"));
    //filters->addSubItem(new ProcessorListItem("Digital Ref"));
    filters->addSubItem(new ProcessorListItem("Channel Map"));

    ProcessorListItem* sinks = new ProcessorListItem("Sinks");
    sinks->addSubItem(new ProcessorListItem("LFP Viewer"));
    //sinks->addSubItem(new ProcessorListItem("LFP Trig. Avg."));
    sinks->addSubItem(new ProcessorListItem("Spike Viewer"));
    //sinks->addSubItem(new ProcessorListItem("WiFi Output"));
    //sinks->addSubItem(new ProcessorListItem("Arduino Output"));
    // sinks->addSubItem(new ProcessorListItem("FPGA Output"));
    sinks->addSubItem(new ProcessorListItem("Pulse Pal"));

    ProcessorListItem* utilities = new ProcessorListItem("Utilities");
    utilities->addSubItem(new ProcessorListItem("Splitter"));
    utilities->addSubItem(new ProcessorListItem("Merger"));
    utilities->addSubItem(new ProcessorListItem("Record Control"));

    baseItem = new ProcessorListItem("Processors");
    baseItem->addSubItem(sources);
    baseItem->addSubItem(filters);
    baseItem->addSubItem(sinks);
    baseItem->addSubItem(utilities);

    // set parent names / colors
    baseItem->setParentName("Processors");

    for (int n = 0; n < baseItem->getNumSubItems(); n++)
    {

        const String category = baseItem->getSubItem(n)->getName();
        baseItem->getSubItem(n)->setParentName(category);

        for (int m = 0; m < baseItem->getSubItem(n)->getNumSubItems(); m++)
        {

            baseItem->getSubItem(n)->getSubItem(m)->setParentName(category);// = category;

        }

    }

}
开发者ID:ElegantCodeFTW,项目名称:GUI,代码行数:70,代码来源:ProcessorList.cpp


注:本文中的ProcessorListItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。