Beispiel #1
0
//! [0]
PathSetting::PathSetting(QWidget *parent)
    : QDialog(parent)
{
  readSettings();

  _dcmrawpathLineEdit = createLineEdit(_dcmrawpath);
  _outputpathLineEdit = createLineEdit(_outputpath);
  _archivepathLineEdit = createLineEdit(_archivepath);

  _dcmrawpathbrowseButton = createButton(tr("&Browse..."), SLOT(browsedcmrawpath()));
  _outputpathbrowseButton = createButton(tr("&Browse..."), SLOT(browseoutputpath()));
  _archivepathbrowseButton = createButton(tr("&Browse..."), SLOT(browsearchivepath()));

  _dcmrawpathLabel = new QLabel("Dicom-RAW Path:");
  _outputpathLabel = new QLabel("Output Path:   ");

  _cb_archiveactive = new QCheckBox("Auto Archive:");
  _cb_archiveactive->setChecked(_archiveactive);
  archiveactive();
  connect(_cb_archiveactive, SIGNAL(stateChanged(int)), this, SLOT(archiveactive()));

  _spacer_line = new QSpacerItem( 450, 20, QSizePolicy::Minimum,
                                 QSizePolicy::Expanding );


  QPushButton *pb_ok = createButton("Ok", SLOT(okbutton()));
  QPushButton *pb_cancle = createButton("Cancel", SLOT(cancelbutton()));

  QHBoxLayout* buttonsLayout = new QHBoxLayout;
  //buttonsLayout->addStretch();
  buttonsLayout->addItem(_spacer_line);
  buttonsLayout->addWidget(pb_ok);
  buttonsLayout->addWidget(pb_cancle);


    QGridLayout *pathLayout = new QGridLayout;
    pathLayout->addWidget(_dcmrawpathLabel, 0, 0);
    pathLayout->addWidget(_dcmrawpathLineEdit, 0, 1);
    pathLayout->addWidget(_dcmrawpathbrowseButton, 0, 2);

    pathLayout->addWidget(_outputpathLabel, 1, 0);
    pathLayout->addWidget(_outputpathLineEdit, 1, 1);
    pathLayout->addWidget(_outputpathbrowseButton, 1, 2);

    pathLayout->addWidget(_cb_archiveactive, 3, 0);
    pathLayout->addWidget(_archivepathLineEdit, 3, 1);
    pathLayout->addWidget(_archivepathbrowseButton, 3, 2);

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addLayout(pathLayout);
    layout->addLayout(buttonsLayout);

    setLayout(layout);

    setWindowTitle(tr("Path Settings"));
    //resize(600, 175);
}
Beispiel #2
0
VariantEditor::VariantEditor(AbstractVariantInterface * property, QWidget * parent)
:   PropertyEditor{parent}
,   m_property{property}
{   
    QWidget * widget = createLineEdit();

    addWidget(widget);
    setFocusProxy(widget);
}
Beispiel #3
0
NumberFormatsWidget::NumberFormatsWidget()
{
    QGridLayout *l = new QGridLayout;

    QLabel *numbersLabel = new QLabel("Numbers:");
    number1 = createLineEdit();
    number2 = createLineEdit();
    number3 = createLineEdit();

    measurementLabel = new QLabel("Measurement units:");
    measurementSystem = createLineEdit();

    l->addWidget(numbersLabel, 0, 0);
    l->addWidget(number1, 0, 1);
    l->addWidget(number2, 0, 2);
    l->addWidget(number3, 0, 3);

    l->addWidget(measurementLabel, 1, 0);
    l->addWidget(measurementSystem, 1, 1, 1, 3);

    QVBoxLayout *v = new QVBoxLayout(this);
    v->addLayout(l);
    v->addStretch();
}
Beispiel #4
0
void OnyxDictFrame::createLayout()
{
    OnyxDialog::updateTitle(tr("Dictionary"));
    updateTitleIcon(QPixmap(":/images/dictionary_title.png"));
    content_widget_.setBackgroundRole(QPalette::Button);
    content_widget_.setContentsMargins(0, 0, 0, 0);

    createLineEdit();
    createSubMenu();
    createDictionaryMenu();
    createTtsButtonView();

    line_edit_layout_.setContentsMargins(0, 2, 0, 0);
    line_edit_layout_.setSpacing(2);
    line_edit_layout_.addWidget(&line_edit_);
    line_edit_layout_.addWidget(&sub_menu_);

    big_layout_.setContentsMargins(2, 2, 2, 2);
    big_layout_.setSpacing(0);
    big_layout_.addLayout(&line_edit_layout_, 0);

    // for explanation and similar words list
    big_layout_.addWidget(&explanation_);
    big_layout_.addWidget(&list_widget_);
    big_layout_.addWidget(&help_widget_);
    list_widget_.setVisible(false);
    help_widget_.setVisible(false);
    help_widget_.setReadOnly(true);

    dict_menu_layout_.setContentsMargins(0, 2, 0, 0);
    dict_menu_layout_.setSpacing(2);
    dict_menu_layout_.addWidget(&dictionary_menu_);
    dict_menu_layout_.addWidget(&tts_button_view_);

    big_layout_.addLayout(&dict_menu_layout_, 0);
    big_layout_.addWidget(&keyboard_);
    big_layout_.addWidget(&status_bar_);

    connect(&list_widget_, SIGNAL(activated(const QModelIndex &)),
            this, SLOT(onItemClicked(const QModelIndex &)));
    connect(&list_widget_, SIGNAL(exceed(bool)),
            this, SLOT(moreSimilarWords(bool)));
    list_widget_.showHeader(false);
}
void OnyxKeyboardDialog::createLayout()
{
    vbox_.setSpacing(0);
    content_widget_.setBackgroundRole(QPalette::Button);
    content_widget_.setContentsMargins(0, 0, 0, 0);
    updateTitle(title_);

    createLineEdit();
    createSubMenu();

    line_edit_layout_.setContentsMargins(0, 2, 0, 0);
    line_edit_layout_.addWidget(&line_edit_);
    line_edit_layout_.setSpacing(2);
    line_edit_layout_.addWidget(&sub_menu_);

    big_layout_.setContentsMargins(2, 2, 2, 2);
    big_layout_.setSpacing(0);
    big_layout_.addLayout(&line_edit_layout_);
    big_layout_.addWidget(&keyboard_);
}
Beispiel #6
0
//! [0]
SpecialSetting::SpecialSetting(QWidget *parent)
    : QDialog(parent)
{
  readSettings();

  QString str_autoloadtimeout;
  str_autoloadtimeout.setNum(_autoload_timeout);

  _le_autoload_timeout = createLineEdit(str_autoloadtimeout);

  _lb_autoload_timeout = new QLabel("Auto Load Timeout: ");

  _spacer_line = new QSpacerItem( 100, 20, QSizePolicy::Minimum,
                                 QSizePolicy::Expanding );


  QPushButton *pb_ok = createButton("Ok", SLOT(okbutton()));
  QPushButton *pb_cancle = createButton("Cancel", SLOT(cancelbutton()));

  QHBoxLayout* buttonsLayout = new QHBoxLayout;
  //buttonsLayout->addStretch();
  buttonsLayout->addItem(_spacer_line);
  buttonsLayout->addWidget(pb_ok);
  buttonsLayout->addWidget(pb_cancle);


    QGridLayout *pathLayout = new QGridLayout;
    pathLayout->addWidget(_lb_autoload_timeout, 0, 0);
    pathLayout->addWidget(_le_autoload_timeout, 0, 1);

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addLayout(pathLayout);
    layout->addLayout(buttonsLayout);

    setLayout(layout);

    setWindowTitle(tr("Special Settings"));
    //resize(150,75);
}
Beispiel #7
0
void OnyxSearchDialog::createLayout()
{
    vbox_.setSpacing(0);
    updateTitleIcon(QPixmap(":/images/search.png"));
    content_widget_.setBackgroundRole(QPalette::Button);
    content_widget_.setContentsMargins(0, 0, 0, 0);

    createLineEdit();
    createSubMenu();
    createNavigateMenu();

    line_edit_layout_.setContentsMargins(0, 2, 0, 0);
    line_edit_layout_.setSpacing(2);
    line_edit_layout_.addWidget(&line_edit_);
    line_edit_layout_.addWidget(&sub_menu_);
    line_edit_layout_.addWidget(&next_prev_);

    big_layout_.setContentsMargins(2, 2, 2, 2);
    big_layout_.setSpacing(0);
    big_layout_.addLayout(&line_edit_layout_, 0);
    big_layout_.addWidget(&keyboard_);
}
Beispiel #8
0
void GUI::initialize() 
{
	readFeatureList();
	KeyWordSearch::getInstance().initialize();
	QGroupBox * input = new QGroupBox("Input");
	QHBoxLayout * inputArea = new QHBoxLayout();
	int width = this->width();
	int height = this->height();
	auto inputTextEdit =  createLineEdit("input", { 0.03f*width ,0.05f* height }, { 200,15 });
	inputTextEdit->setParent(this);
	auto recommnedButton = createButton("RecommendButton", "Find", { 0.5f * width, 0.05* height }, { 50,20 });
	recommnedButton->setParent(this);

	inputArea->addWidget(inputTextEdit);
	inputArea->addWidget(recommnedButton);
	inputArea->addStretch(1);
	input->setLayout(inputArea);

	QGroupBox * output = new QGroupBox("Output");
	 outputButtons = new QGroupBox("Output");
	QHBoxLayout * outputArea = new QHBoxLayout();
	//auto outputTextEdit = createLineEdit("output", { 0.03f*width ,0.05f* height }, { 500,500 });
	auto outputTextEdit = createTextDisplay("OutputText", { 0,0 }, { 300,500 }, false);
	auto recommendeOutTextEdit = createTextDisplay("RecommendedOutputText", { 0,0 }, { 300,500 }, false);
	recommendeOutTextEdit->setParent(this);
	outputTextEdit->setParent(this);
	outputArea->addWidget(outputTextEdit);
	outputArea->addWidget(recommendeOutTextEdit);

	
	QVBoxLayout * outputButtonArea = new QVBoxLayout();
	auto itr = featureList.begin();
	auto itrEnd = featureList.end();
	while (itr != itrEnd)
	{
		auto label = new QLabel((itr->first).c_str());
		label->setParent(this);
		outputButtonArea->addWidget(label);
		auto itrVector = itr->second.begin();
		auto itrVectorEnd = itr->second.end();
		while (itrVector != itrVectorEnd)
		{
			auto button1 = createCheckBox(*itrVector, *itrVector, { 0,0 }, false);
			button1->setParent(this);
			outputButtonArea->addWidget(button1);
			++itrVector;
		}

		++itr;
	}
	auto button2 = createButton("FilterSearch", "Search");
	outputButtonArea->addWidget(button2);
	outputButtonArea->addStretch(1);
	outputButtons->setLayout(outputButtonArea);
	outputArea->addWidget(outputButtons);
	outputButtons->setVisible(false);

	output->setLayout(outputArea);
	outputArea->addStretch(1);
	mainLayout->addWidget(input);
	mainLayout->addWidget(output);
	mainLayout->addStretch(1);

	connectToTask();
}
Beispiel #9
0
FoldersTab::FoldersTab(QWidget *parent)
{
	lastdirpath = QDir::homePath();
	lastdirpath = "C:\\Lab\\ArunFiles\\Data\\Tracking";

	browseNumbersDirectoryButton = createButton(tr("&Browse..."), SLOT(browseNumbersDirectory()));
	browseEntropyDirectoryButton = createButton(tr("&Browse..."), SLOT(browseEntropyDirectory()));
	browseDebugDirectoryButton = createButton(tr("&Browse..."), SLOT(browseDebugDirectory()));
	browseResultDirectoryButton	= createButton(tr("&Browse..."), SLOT(browseResultDirectory()));

	numbersdirectoryLabel = new QLabel(tr("Numbers File:"));
	entropyfileLabel = new QLabel(tr("Entropy Filename:"));
	entropydirectoryLabel = new QLabel(tr("Entropy Folder:"));
	debugdprefixLabel = new QLabel(tr("Debug Prefix:"));
	debugfileLabel = new QLabel(tr("Debug Filename:"));
	debugdirectoryLabel = new QLabel(tr("Debug Folder:"));
	loadLabel = new QLabel(tr("Load Files:"));
	saveLabel = new QLabel(tr("Save Files:"));
	resultprefixLabel = new QLabel(tr("Result Prefix:"));
	resultdirectoryLabel = new QLabel(tr("Result Folder:"));


	numbersdirectoryLineEdit = createLineEdit("C:\\Lab\\ArunFiles\\Data\\Tracking\\numbers.bmp");
	entropyfileLineEdit = createLineEdit("Entropy.txt");
	entropydirectoryLineEdit = createLineEdit(lastdirpath);
	debugfileLineEdit = createLineEdit("debug.txt");
	//debugdirectoryLineEdit = createLineEdit(lastdirpath);
	debugdirectoryLineEdit = createLineEdit("C:\\Lab\\ArunFiles\\Data\\Tracking\\debug\\");
	
	debugdprefixLineEdit = createLineEdit("1color");
	resultprefixLineEdit= createLineEdit("labeled_tracks");
	resultdirectoryLineEdit = createLineEdit(lastdirpath);

	QGroupBox * loadgroupBox = new QGroupBox(tr("Load Files"));
	QGridLayout * loadLayout = new QGridLayout;
	loadLayout->addWidget(numbersdirectoryLabel, 0, 0);
	loadLayout->addWidget(numbersdirectoryLineEdit, 0, 1);
	loadLayout->addWidget(browseNumbersDirectoryButton, 0, 2);
	loadgroupBox->setLayout(loadLayout);

	QGroupBox * savegroupBox = new QGroupBox(tr("Save Files"));
	QGridLayout * saveLayout = new QGridLayout;

	QGroupBox * reslutgroupBox = new QGroupBox;
	QGridLayout * reslutLayout = new QGridLayout;
	reslutLayout->addWidget(resultprefixLabel, 2, 0);
	reslutLayout->addWidget(resultprefixLineEdit, 2, 1, 1, 2);
	reslutLayout->addWidget(resultdirectoryLabel, 3, 0);
	reslutLayout->addWidget(resultdirectoryLineEdit, 3, 1);
	reslutLayout->addWidget(browseResultDirectoryButton, 3, 2);
	reslutgroupBox->setLayout(reslutLayout);

	QGroupBox * entropygroupBox = new QGroupBox;
	QGridLayout * entropyLayout = new QGridLayout;
	entropyLayout->addWidget(entropyfileLabel, 2, 0);
	entropyLayout->addWidget(entropyfileLineEdit, 2, 1, 1, 2);
	entropyLayout->addWidget(entropydirectoryLabel, 3, 0);
	entropyLayout->addWidget(entropydirectoryLineEdit, 3, 1);
	entropyLayout->addWidget(browseEntropyDirectoryButton, 3, 2);
	entropygroupBox->setLayout(entropyLayout);

	QGroupBox * debuggroupBox = new QGroupBox;
	QGridLayout * debugLayout = new QGridLayout;
	debugLayout->addWidget(debugdprefixLabel, 0, 0);
	debugLayout->addWidget(debugdprefixLineEdit, 0, 1, 1, 2);
	debugLayout->addWidget(debugfileLabel, 1, 0);
	debugLayout->addWidget(debugfileLineEdit, 1, 1, 1, 2);
	debugLayout->addWidget(debugdirectoryLabel, 2, 0);
	debugLayout->addWidget(debugdirectoryLineEdit, 2, 1);
	debugLayout->addWidget(browseDebugDirectoryButton, 2, 2);
	debuggroupBox->setLayout(debugLayout);

	saveLayout->addWidget(reslutgroupBox,0,0);
	saveLayout->addWidget(entropygroupBox,1,0);
	saveLayout->addWidget(debuggroupBox,2,0);
	savegroupBox->setLayout(saveLayout);

	QVBoxLayout * mainLayout = new QVBoxLayout;
	mainLayout->addWidget(loadgroupBox,0,0);
	mainLayout->addWidget(savegroupBox,1,0);
	setLayout(mainLayout);

}