Пример #1
0
void Role::makeConnection()
{
    connect(logic->getClient(),SIGNAL(getMessage(QString)),this,SLOT(decipher(QString)));
    connect(this,SIGNAL(sendCommand(QString)),logic->getClient(),SLOT(sendMessage(QString)));
    connect(decisionArea,SIGNAL(okClicked()),this,SLOT(onOkClicked()));
    connect(decisionArea,SIGNAL(cancelClicked()),this,SLOT(onCancelClicked()));
    connect(decisionArea,SIGNAL(exchangeClicked()),this,SLOT(exchangeCards()));
    connect(decisionArea,SIGNAL(resignClicked()),this,SLOT(resign()));
    connect(buttonArea->getButtons().at(0),SIGNAL(buttonSelected(int)),this,SLOT(buy()));
    connect(buttonArea->getButtons().at(1),SIGNAL(buttonSelected(int)),this,SLOT(synthetize()));
    connect(buttonArea->getButtons().at(2),SIGNAL(buttonSelected(int)),this,SLOT(extract()));
    connect(buttonArea,SIGNAL(buttonUnselected()),this,SLOT(onCancelClicked()));
    connect(handArea,SIGNAL(cardReady()),this,SLOT(cardAnalyse()));
    connect(playerArea,SIGNAL(playerReady()),this,SLOT(playerAnalyse()));
}
Пример #2
0
QuetzalChoiceDialog::QuetzalChoiceDialog(const char *title, const char *primary,
										 const char *secondary, int default_value,
										 const char *ok_text, GCallback ok_cb,
										 const char *cancel_text, GCallback cancel_cb,
										 void *user_data, va_list choices,
										 QWidget *parent)
			   : QuetzalRequestDialog(title, primary, secondary, PURPLE_REQUEST_CHOICE, user_data, parent)
{
	m_ok_cb = (PurpleRequestChoiceCb) ok_cb;
	m_cancel_cb = (PurpleRequestChoiceCb) cancel_cb;
	QPushButton *ok_button = buttonBox()->addButton(ok_text, QDialogButtonBox::AcceptRole);
	QPushButton *cancel_button = buttonBox()->addButton(cancel_text, QDialogButtonBox::RejectRole);
	connect(ok_button, SIGNAL(clicked()), this, SLOT(onOkClicked()));
	connect(cancel_button, SIGNAL(clicked()), this, SLOT(onCancelClicked()));
	const char *text;
	int id;
	int i = 1; // Label with description is situated at index 0
	while (!!(text = va_arg(choices, gchararray))) {
		id = va_arg(choices, int);
		QRadioButton *button = new QRadioButton(text, this);
		m_radios << button;
		button->setProperty("choiceId", id);
		boxLayout()->insertWidget(i++, button);
		if (id == default_value)
			button->setChecked(true);
	}
}
Пример #3
0
ExportDialog::ExportDialog(QWidget *parent) :
    QDialog(parent)
{
    QVBoxLayout *mainLayout = new QVBoxLayout();
    QHBoxLayout *lay1 = new QHBoxLayout();
    QHBoxLayout *lay2 = new QHBoxLayout();
    lay2->addStretch();
    mainLayout->addLayout(lay1);
    mainLayout->addStretch();
    mainLayout->addLayout(lay2);

    cbTimestamps = new QCheckBox("Export Timestamps");
    lay1->addWidget(cbTimestamps);
    cbTimestamps->setChecked(true);

    bCancel = new QPushButton("Cancel");
    lay2->addWidget(bCancel);
    bOk = new QPushButton("Ok");
    lay2->addWidget(bOk);

    this->setWindowTitle("Export OSC Messages to a CSV file");
    this->setLayout(mainLayout);
    this->setFixedSize(350, 120);

    connect(bOk, SIGNAL(clicked()), this, SLOT(onOkClicked()));
    connect(bCancel, SIGNAL(clicked()), this, SLOT(onCancelClicked()));
    connect(cbTimestamps, SIGNAL(stateChanged(int)), this, SLOT(onExportTimestampsChecked(int)));
}
Пример #4
0
AdvancedSettings::AdvancedSettings()
{
    ui.setupUi (this);
    resize (0, 0);

    /* Main dialog buttons */
    connect (ui.ApplyButton, SIGNAL (clicked()), this, SLOT (onApplyClicked()));
    connect (ui.ResetButton, SIGNAL (clicked()), this, SLOT (onResetClicked()));
    connect (ui.CancelButton, SIGNAL (clicked()), this, SLOT (onCancelClicked()));

    /* Appearance tab */
    connect (ui.BaseButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked()));
    connect (ui.HighlightButton, SIGNAL (clicked()), this,
             SLOT (onSelectorClicked()));
    connect (ui.BackgroundButton, SIGNAL (clicked()), this,
             SLOT (onSelectorClicked()));
    connect (ui.ForegroundButton, SIGNAL (clicked()), this,
             SLOT (onSelectorClicked()));
    connect (ui.BaseEdit, SIGNAL (textChanged (QString)), this,
             SLOT (onColorChanged (QString)));
    connect (ui.HighlightEdit, SIGNAL (textChanged (QString)), this,
             SLOT (onColorChanged (QString)));
    connect (ui.BackgroundEdit, SIGNAL (textChanged (QString)), this,
             SLOT (onColorChanged (QString)));
    connect (ui.ForegroundEdit, SIGNAL (textChanged (QString)), this,
             SLOT (onColorChanged (QString)));

    readSettings();
}
FingerprinterProgressBar::FingerprinterProgressBar( QWidget* parent, Qt::WindowFlags f )
        : QDialog( parent, f | Qt::Sheet ),
          m_stopped( false )
{
    ui.setupUi( this );
    setModal( true );
    setRunning( false );
    
    m_totalTracks = m_tracksFingerprinted = m_tracksSkipped = m_tracksWithErrors = 0;
    
    m_timer.setInterval( 1000 );
    connect(&m_timer, SIGNAL(timeout()), this, SLOT(update()));
    connect(ui.fingerprintProgressBar, SIGNAL( valueChanged( int ) ), this, SLOT( progressBarChanged( int ) ) );   
 
    m_timeElapsed = m_etaCounter = m_timeRemaining = 0;
    
    setFixedHeight( sizeHint().height() );

    ui.okButton->setVisible( false );

    connect( ui.okButton, SIGNAL( clicked() ),
             this, SLOT( onOkClicked() ) );
    connect( ui.stopButton, SIGNAL( clicked() ),
             this, SLOT( onCancelClicked() ) );
}
Пример #6
0
OfferStorageDialog::OfferStorageDialog(IncClient* client, QString clusterName, QObject* parent) : QObject(parent)
{
    dialog = new QDialog();
    ui = new Ui::CreateClusterDialog();
    ui->setupUi(dialog);

    this->client = client;
    this->clusterName = clusterName;

    dialog->setWindowTitle(QString("Offer storage to: %1").arg(clusterName));
    ui->clusterNameLineEdit->setText(clusterName);
    ui->clusterNameLineEdit->setEnabled(false);

    //Set some default values:
    ui->locationLineEdit->setText(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
    double size = 11111111111;
    ui->sizeLineEdit->setText("11111111111");
    ui->sizeIndicatorLabel->setText(FileSizeUtils::getAppropriateFileSizeFor(size));

    connect(ui->saveButton, SIGNAL(clicked()),this, SLOT(onOfferClicked()));
    connect(ui->browseButton, SIGNAL(clicked()),this, SLOT(onBrowseClicked()));
    connect(ui->cancelButton, SIGNAL(clicked()),this, SLOT(onCancelClicked()));
    connect(ui->sizeLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onSizeChanged(QString)));
    dialog->exec();
}
Пример #7
0
SetAliasDialog::SetAliasDialog(QWidget* parent)
  : QDialog(parent)
  , ui(new Ui::SetAliasDialog)
{
    ui->setupUi(this);

    connect(ui->okButton, SIGNAL(clicked()),
            this, SLOT(onOkClicked()));
    connect(ui->cancelButton, SIGNAL(clicked()),
            this, SLOT(onCancelClicked()));
}
Пример #8
0
SettingDialog::SettingDialog(QWidget* parent)
  : QDialog(parent)
  , ui(new Ui::SettingDialog)
{
  ui->setupUi(this);

  connect(ui->saveButton, SIGNAL(clicked()),
          this, SLOT(onSaveClicked()));
  connect(ui->cancelButton, SIGNAL(clicked()),
          this, SLOT(onCancelClicked()));
}
Пример #9
0
InviteListDialog::InviteListDialog(QWidget *parent)
  :QDialog(parent)
  , ui(new Ui::InviteListDialog)
  , m_contactListModel(new QStringListModel)
{
  ui->setupUi(this);

  ui->contactListView->setModel(m_contactListModel);

  connect(ui->inviteButton, SIGNAL(clicked()),
          this, SLOT(onInviteClicked()));
  connect(ui->cancelButton, SIGNAL(clicked()),
          this, SLOT(onCancelClicked()));
}
Пример #10
0
InitSeafileDialog::InitSeafileDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    setWindowTitle(tr("Seafile Initialzation"));
    setWindowIcon(QIcon(":/images/seafile.png"));

    connect(mChooseDirBtn, SIGNAL(clicked()), this, SLOT(chooseDir()));
    connect(mOkBtn, SIGNAL(clicked()), this, SLOT(onOkClicked()));
    connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(onCancelClicked()));

    mLogo->setPixmap(QPixmap(":/images/seafile-32.png"));
    mDirectory->setText(getInitialPath());

    const QRect screen = QApplication::desktop()->screenGeometry();
    move(screen.center() - this->rect().center());
}
Пример #11
0
// -----------------------------------------------------------------------------
SettingsDialog::SettingsDialog(QWidget *pp, bool track_en, bool track_btn_en,
        const TrackSettings &track, const QString &logfile, const int logbufsize)
: QDialog(pp), m_devctrls(0), m_rotation(90), m_colortrack_en(track_en)
{
    setupUi(this);

    // label the color tracking button appropriately
    if (m_colortrack_en)
        btnToggleTracking->setText("Disable Tracking");
    else
        btnToggleTracking->setText("Enable Tracking");

    //btnToggleTracking->setEnabled(track_btn_en);

    // add a vertical spacer at some absurdly high row index
    ((QGridLayout *)deviceControlScrollAreaContents->layout())->addItem(
        new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding),
        99999, 0, 1, 1);

    // connect primary button events
    connect(btnLogFile, SIGNAL(released()), this, SLOT(onBrowseClicked()));
    connect(btnCancel, SIGNAL(released()), this, SLOT(onCancelClicked()));
    connect(btnOK, SIGNAL(released()), this, SLOT(onOkClicked()));
    connect(btnApply, SIGNAL(released()), this, SLOT(onApplyClicked()));
    connect(btnNewColor, SIGNAL(released()), this, SLOT(onNewColorClicked()));

    // assign specified color and threshold values to dialog widgets
    /*
    sbR->setValue(track.color.red());
    sbG->setValue(track.color.green());
    sbB->setValue(track.color.blue());
    sbHt->setValue(track.ht);
    sbSt->setValue(track.st);
    sbFt->setValue(track.ft);
    
    //Set Initial Tracking FPS
    sbTrackingFps->setValue(10);
    */
        
    //TODO: Set LogFile Value       
    editLogFileName->setText(logfile);
    sbLogBuffer->setValue(logbufsize);
}
Пример #12
0
InitSeafileDialog::InitSeafileDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    setWindowTitle(tr("%1 Initialization").arg(getBrand()));
    setWindowIcon(QIcon(":/images/seafile.png"));
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    connect(mChooseDirBtn, SIGNAL(clicked()), this, SLOT(chooseDir()));
    connect(mOkBtn, SIGNAL(clicked()), this, SLOT(onOkClicked()));
    connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(onCancelClicked()));

    mTitle->setStyleSheet("QLabel { color : #0099EE; }"); //disk42
    mLogo->setPixmap(QPixmap(":/images/seafile-32.png"));
    mDirectory->setText(getInitialPath());

    const QRect screen = QApplication::desktop()->screenGeometry();
    move(screen.center() - this->rect().center());
}
void Logic::setupRoom(bool isStarted, GameInfo *gameInfo)
{
    if(!init_before_start && !isStarted) {
        connect(gui->getDecisionArea(),SIGNAL(okClicked()),this,SLOT(onOkClicked()));
        connect(gui->getDecisionArea(),SIGNAL(cancelClicked()),this,SLOT(onCancelClicked()));
        connect(gui->getBPArea(),SIGNAL(roleReady()),this,SLOT(roleAnalyse()));
        dataInterface->setupRoom(isStarted);
        gui->setupRoom(isStarted);
        normal();
        init_before_start = true;
#ifdef DEBUG
        ready();
#endif
    }
    else if(!init_after_start && isStarted){
        dataInterface->initPlayerList(gameInfo);
        dataInterface->setupRoom(isStarted);
        gui->setupRoom(isStarted);
        init_after_start = true;
    }
}
Пример #14
0
/**
 * \brief Constructor
 * @param parent as the parent widget
 * @param name as the widget object name
 */
UBDownloadWidget::UBDownloadWidget(QWidget *parent, const char *name):QWidget(parent)
  , mpLayout(NULL)
  , mpBttnLayout(NULL)
  , mpTree(NULL)
  , mpCancelBttn(NULL)
  , mpItem(NULL)
{
    setObjectName(name);
    setWindowTitle(tr("Downloading files"));
    SET_STYLE_SHEET();
    resize(400, 300);

    mpLayout = new QVBoxLayout(this);
    setLayout(mpLayout);

    mpTree = new QTreeWidget(this);
    mpTree->setRootIsDecorated(false);
    mpTree->setColumnCount(2);
    mpTree->header()->setStretchLastSection(false);
    mpTree->header()->setResizeMode(eItemColumn_Desc, QHeaderView::Stretch);
    mpTree->header()->setResizeMode(eItemColumn_Close, QHeaderView::Custom);
    mpTree->resizeColumnToContents(eItemColumn_Close);
    mpTree->header()->close();
    mpLayout->addWidget(mpTree, 1);

    mpBttnLayout = new QHBoxLayout();
    mpBttnLayout->addStretch(1);
    mpCancelBttn = new QPushButton(tr("Cancel"), this);
    mpCancelBttn->setObjectName("DockPaletteWidgetButton");
    mpBttnLayout->addWidget(mpCancelBttn, 0);
    mpLayout->addLayout(mpBttnLayout);

    connect(UBDownloadManager::downloadManager(), SIGNAL(fileAddedToDownload()), this, SLOT(onFileAddedToDownload()));
    connect(UBDownloadManager::downloadManager(), SIGNAL(downloadUpdated(int,qint64,qint64)), this, SLOT(onDownloadUpdated(int,qint64,qint64)));
    connect(UBDownloadManager::downloadManager(), SIGNAL(downloadFinished(int)), this, SLOT(onDownloadFinished(int)));
    connect(mpCancelBttn, SIGNAL(clicked()), this, SLOT(onCancelClicked()));
    connect(mpTree, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(onItemClicked(QTreeWidgetItem*,int)));
}
Пример #15
0
AddContactPanel::AddContactPanel(QWidget *parent)
  : QDialog(parent)
  , ui(new Ui::AddContactPanel)
{
  ui->setupUi(this);

  connect(ui->cancelButton, SIGNAL(clicked()),
          this, SLOT(onCancelClicked()));
  connect(ui->searchButton, SIGNAL(clicked()),
          this, SLOT(onSearchClicked()));
  connect(ui->addButton, SIGNAL(clicked()),
          this, SLOT(onAddClicked()));

  ui->infoView->setColumnCount(3);

  m_typeHeader = new QTableWidgetItem(QString("Type"));
  ui->infoView->setHorizontalHeaderItem(0, m_typeHeader);
  m_valueHeader = new QTableWidgetItem(QString("Value"));
  ui->infoView->setHorizontalHeaderItem(1, m_valueHeader);
  m_endorseHeader = new QTableWidgetItem(QString("Endorse"));
  ui->infoView->setHorizontalHeaderItem(2, m_endorseHeader);

}
Пример #16
0
ViewOptsWidget::ViewOptsWidget(QWidget *parent):QScrollArea(parent)
{
  m_widg=new QWidget(this);
  QVBoxLayout *layout = new QVBoxLayout(m_widg);
  layout->addWidget(new QLabel("Number of marks, shown from each channel:"));
  layout->addWidget(m_marksCountEdit = new QSpinBox(this) );
  layout->addWidget(new QLabel("Max age of mark:"));
  layout->addWidget(m_timeFilterEdit = new QSpinBox(this) );
  m_marksCountEdit->setMinimum(1);
  m_marksCountEdit->setMaximum(10);
  m_timeFilterEdit->setMaximum(60);
  m_timeFilterEdit->setMinimum(1);
  QHBoxLayout *buttonLayout = new QHBoxLayout();
  buttonLayout->addWidget(m_doneButton = new QPushButton("Done"));
  buttonLayout->addWidget(m_cancelButton = new QPushButton("Cancel"));
  layout->addLayout(buttonLayout);
  m_widg->setLayout(layout);
  this->setWidget(m_widg);
  this->setWidgetResizable(true);
  connect(m_doneButton, SIGNAL(clicked()), this, SLOT(onDoneClicked()));
  connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(onCancelClicked()));

  QSettings settings(QSettings::SystemScope,"osll","libs");
  /*    if (settings.value("timeLimit").toInt()>60 || settings.value("timeLimit").toInt()<1){
        m_timeFilterEdit->setValue(4);
      }else {*/
  m_timeFilterEdit->setValue(settings.value("timeLimit").toInt());
  /* }
  if (settings.value("marksCount").toInt()>10 || settings.value("marksCount").toInt()<1){
   m_marksCountEdit->setValue(10);
  }else {*/
  m_marksCountEdit->setValue(settings.value("marksCount").toInt());
  //    }
  qDebug() << "initing timeLimit as " << m_timeFilterEdit->value();
  qDebug() << "initing marksCount as " << m_marksCountEdit->value();

}
Пример #17
0
void FingerprinterProgressBar::closeEvent( QCloseEvent *event )
{
    event->ignore();
    onCancelClicked();
}
Пример #18
0
OptionsWidget::OptionsWidget(QString productName,QWidget *parent) :
QScrollArea(parent), m_productName(productName), m_settings(QSettings::SystemScope,"osll",m_productName)
{
  m_widget = new QWidget(this);

  QVBoxLayout * layout = new QVBoxLayout(m_widget);

  layout->addWidget(new QLabel("Login", m_widget));
  layout->addWidget(m_nameEdit = new QLineEdit(m_widget));
  layout->addWidget(new QLabel("Password", m_widget));
  layout->addWidget(m_passwordEdit = new QLineEdit(m_widget));
  layout->addWidget(m_passwordCheckBox = new QCheckBox("Show password", m_widget));
  layout->addWidget(new QLabel("Channel name", m_widget));
  layout->addWidget(m_channelEdit = new QLineEdit(m_widget));
  // NOTE if we use m_widget windget in tracker addition field for username will displayed
  if (m_productName == "tracker")
  {
    layout->addWidget(new QLabel("Name that will be displayed\non Observer map:", m_widget));
    layout->addWidget(m_visibleNameEdit = new QLineEdit());
  }

  m_passwordEdit->setEchoMode(QLineEdit::Password);
  m_passwordCheckBox->setChecked(false);

  layout->addWidget(new QLabel("Server", m_widget));
  layout->addWidget(m_serverUrlEdit = new QLineEdit(m_widget));
  layout->addWidget(new QLabel("Port", m_widget));
  layout->addWidget(m_serverPortEdit = new QSpinBox(m_widget));

  m_serverPortEdit->setMinimum(0);
  m_serverPortEdit->setMaximum(65535);

  layout->addWidget(new QLabel("Proxy type", m_widget));
  layout->addWidget(m_proxyType = new QComboBox(m_widget));
  layout->addWidget(new QLabel("Proxy host", m_widget));
  layout->addWidget(m_proxyHostEdit = new QLineEdit(m_widget));
  layout->addWidget(new QLabel("Proxy port", m_widget));
  layout->addWidget(m_proxyPortEdit = new QSpinBox(m_widget));

  m_proxyType->addItem("DefaultProxy", QNetworkProxy::DefaultProxy);
  m_proxyType->addItem("Socks5Proxy", QNetworkProxy::Socks5Proxy);
  m_proxyType->addItem("NoProxy", QNetworkProxy::NoProxy);
  m_proxyType->addItem("HttpProxy", QNetworkProxy::HttpProxy);
  m_proxyType->addItem("HttpCachingProxy", QNetworkProxy::HttpCachingProxy);
  m_proxyType->addItem("FtpCachingProxy", QNetworkProxy::FtpCachingProxy);
  m_proxyPortEdit->setMinimum(0);
  m_proxyPortEdit->setMaximum(65535);

  layout->addWidget(new QLabel("Cache type", m_widget));
  layout->addWidget(m_cacheType = new QComboBox(m_widget));
  layout->addWidget(new QLabel("Cache path", m_widget));
  layout->addWidget(m_cachePath = new QLineEdit(m_widget));
  layout->addWidget(m_cachePathButton = new QPushButton("Choose dir...", m_widget));
  layout->addWidget(new QLabel("Max cache size", m_widget));
  layout->addWidget(m_cacheMaxSize = new QSpinBox(m_widget));

  m_cacheType->addItem("None", 0);
  m_cacheType->addItem("Network cache", 1);
  m_cacheType->addItem("Disk cache", 2);
  m_cacheType->setCurrentIndex(-1);

  layout->addWidget(m_doneButton = new QPushButton("Done", m_widget));
  layout->addWidget(m_defaultButton = new QPushButton("Default settings", m_widget));
  layout->addWidget(m_cancelButton = new QPushButton("Cancel", m_widget));

  m_widget->setLayout(layout);
  this->setWidget(m_widget);
  this->setWidgetResizable(true);

  connect(m_doneButton, SIGNAL(clicked()), this, SLOT(onDoneClicked()));
  connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(onCancelClicked()));
  connect(m_defaultButton,SIGNAL(clicked()), this, SLOT(setDefaultSettings()));
  connect(m_proxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(onProxyTypeChanged(int)));
  connect(m_cacheType, SIGNAL(currentIndexChanged(int)), this, SLOT(onCacheTypeChanged(int)));
  connect(m_cachePathButton, SIGNAL(clicked()), this, SLOT(onCachePathButtonClick()));
  connect(m_passwordCheckBox, SIGNAL(clicked(bool)), this, SLOT(onShowPasswordChecked(bool)));

  onProxyTypeChanged(m_proxyType->currentIndex());

  if( m_settings.value("magic").toString() != APP_MAGIC )
  {
    setDefaultSettings();
    createSettings();
  }

  initSettings();
  applyProxySettings();
}
Пример #19
0
void QuetzalChoiceDialog::closeRequest()
{
	onCancelClicked();
}
Пример #20
0
ImportTensorWindow::ImportTensorWindow(QWidget *parent, int nDimension, int nCompCount) :
	QDialog(parent)
{
	setWindowTitle(tr("Enter the tensor"));

	m_nameLabel = new QLabel(this);
	m_nameLabel->setText(tr("Enter the name:"));

	m_nameLine = new QLineEdit(this);
	m_nameLine->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);

	m_importButton = new QPushButton(this);
	m_importButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
	m_importButton->setText(tr("Import"));
	m_importButton->setVisible(false);

	m_okButton = new QPushButton(this);
	m_okButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
	m_okButton->setText(tr("OK"));

	m_cancelButton = new QPushButton(this);
	m_cancelButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
	m_cancelButton->setText(tr("Cancel"));

	m_inputTabsWidget = new TabsWidget(this);
	QString matrixName = "";
	int matrixNumber = 1;

	while(matrixNumber < nCompCount + 1)
	{
		matrixName.append(tr("Matrix %1").arg(matrixNumber));
		m_inputTabsWidget->addTab(new MatrixViewWidget(nDimension, nDimension), matrixName);
		matrixName.clear();
		matrixNumber++;
	}

	QFormLayout* nameLayout = new QFormLayout;
	nameLayout->addRow(m_nameLabel, m_nameLine);

	QHBoxLayout* importLayout = new QHBoxLayout;
	importLayout->addWidget(m_importButton);
	importLayout->setAlignment(Qt::AlignLeft);

	QHBoxLayout* okCancelLayout = new QHBoxLayout;
	okCancelLayout->addWidget(m_okButton);
	okCancelLayout->addWidget(m_cancelButton);
	okCancelLayout->setAlignment(Qt::AlignRight);

	QHBoxLayout* buttonLayout = new QHBoxLayout;
	buttonLayout->addLayout(importLayout);
	buttonLayout->addLayout(okCancelLayout);

	QVBoxLayout* mainLayout = new QVBoxLayout;
	mainLayout->addLayout(nameLayout);
	mainLayout->addWidget(m_inputTabsWidget);
	mainLayout->addLayout(buttonLayout);

	this->setLayout(mainLayout);

	connect(m_importButton, SIGNAL(clicked()), this, SLOT(onImportClicked()));
	connect(m_okButton, SIGNAL(clicked()), this, SLOT(onOkClicked()));
	connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(onCancelClicked()));
}