void CViewControlsPanelGeneral::CreateWidgets()
{
	// I. Top Buttons Row

	mNewDisplayButton = CreateToolButton( "", ":/images/OSGeo/new.png", "Create a new view" );
    mRenameDisplayButton = CreateToolButton( "", ":/images/OSGeo/edit.png", "Rename the selected view" );
	mDeleteDisplayButton = CreateToolButton( "", ":/images/OSGeo/workspace-delete.png", "Delete the selected view" );
	mExecuteDisplay = CreateToolButton( "Reset", ":/images/OSGeo/execute.png", "Rebuild the view(s)" );
	mExecuteDisplay->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );


	QWidget *top_buttons_row = CreateButtonRow( false, Qt::Horizontal, 
	{ 
		mNewDisplayButton, mRenameDisplayButton, mDeleteDisplayButton, nullptr, mExecuteDisplay
	} );

	// II. Left Layout

    mDisplaysCombo = new QComboBox;
    mDisplaysCombo->setToolTip( "Open a view" );
	mDisplaysCombo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Maximum );

	auto title_label = new QLabel( "Title" );
	title_label->setToolTip( "Press enter to assign new title" );
    mPlotTitle = new QLineEdit(this);
    mPlotType = new QLineEdit(this);
	SetReadOnlyEditor( mPlotType, true );

	auto *plots_group = //CreateGroupBox( ELayoutType::Horizontal,
			LayoutWidgets( Qt::Horizontal,
	{
		CreateGroupBox( ELayoutType::Horizontal,
		{
            mDisplaysCombo, title_label, mPlotTitle, new QLabel( "Type" ), mPlotType
        }, "Operation Views", nullptr ),
	},
	nullptr, s, m, m, m, m );
    mPlotType->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );

    auto *plots_l = LayoutWidgets( Qt::Vertical, 
	{ 
        top_buttons_row,
		plots_group
	}, 
	nullptr, 4, 4, top_margin, 4, top_margin );


	mViewsLayout = LayoutWidgets( Qt::Horizontal, { plots_l }, nullptr, s, m, m, m, m );
}
void SelectPathWidgetBase::Init(DAVA::String& _openDialogDefualtPath, DAVA::String& _relativPath,DAVA::String _openFileDialogTitle, DAVA::String _fileFormatFilter)
{
	setAcceptDrops(true);
	
	relativePath = DAVA::FilePath(_relativPath);
	openDialogDefaultPath = _openDialogDefualtPath;
	openFileDialogTitle = _openFileDialogTitle;
	fileFormatFilter = _fileFormatFilter;
	
	clearButton = CreateToolButton(":/QtIcons/ccancel.png");
	openButton = CreateToolButton(":/QtIcons/openscene.png");
		
	connect(clearButton, SIGNAL(clicked()), this, SLOT(EraseClicked()));
	connect(openButton, SIGNAL(clicked()), this, SLOT(OpenClicked()));
	connect(this, SIGNAL(editingFinished()), this, SLOT(acceptEditing()));
}