Esempio n. 1
0
// Constructor
OptionsDialog::OptionsDialog( QWidget* parent ) : QDialog(parent)
{
    setupUi( this );

    setupTabs();
    setupFontList();
    setupRegexp();

    // Validators
    QValidator* polling_interval_validator_ = new QIntValidator(
           POLL_INTERVAL_MIN, POLL_INTERVAL_MAX, this );
    pollIntervalLineEdit->setValidator( polling_interval_validator_ );

    connect(buttonBox, SIGNAL( clicked( QAbstractButton* ) ),
            this, SLOT( onButtonBoxClicked( QAbstractButton* ) ) );
    connect(fontFamilyBox, SIGNAL( currentIndexChanged(const QString& ) ),
            this, SLOT( updateFontSize( const QString& ) ));
    connect(incrementalCheckBox, SIGNAL( toggled( bool ) ),
            this, SLOT( onIncrementalChanged() ) );
    connect(pollingCheckBox, SIGNAL( toggled( bool ) ),
            this, SLOT( onPollingChanged() ) );

    updateDialogFromConfig();

    setupIncremental();
    setupPolling();
}
Esempio n. 2
0
MidiMixerWindow::MidiMixerWindow(QWidget *parent,
                                 RosegardenDocument *document):
    MixerWindow(parent, document),
    m_tabFrame(0)
{
    // Initial setup
    //
    setupTabs();

    createAction("file_close", SLOT(slotClose()));

    createAction("play", SIGNAL(play()));
    createAction("stop", SIGNAL(stop()));
    createAction("playback_pointer_back_bar", SIGNAL(rewindPlayback()));
    createAction("playback_pointer_forward_bar", SIGNAL(fastForwardPlayback()));
    createAction("playback_pointer_start", SIGNAL(rewindPlaybackToBeginning()));
    createAction("playback_pointer_end", SIGNAL(fastForwardPlaybackToEnd()));
    createAction("record", SIGNAL(record()));
    createAction("panic", SIGNAL(panic()));
    createAction("midimix_help", SLOT(slotHelpRequested()));
    createAction("help_about_app", SLOT(slotHelpAbout()));

    createGUI("midimixer.rc");
    setRewFFwdToAutoRepeat();
}
KHInternetWidget::KHInternetWidget(QWidget *parent) : QVBox(parent, "KHInternetWidget"), m_parser(0), m_chat(0)
{
	setCaption(i18n("Internet"));
	setIcon( SmallIcon("network"));
	m_tabBar = new KTabWidget(this);
	setupTabs();
}
Esempio n. 4
0
AddressWidget::AddressWidget(QWidget *parent)
    : QTabWidget(parent)
{
    table = new TableModel(this);
    //newAddressTab = new NewAddressTab(this);
   // connect(newAddressTab, SIGNAL(sendDetails(QString,QString)),
    //    this, SLOT(addEntry(QString,QString)));

    //addTab(newAddressTab, "Address Book");

    setupTabs();
}
Esempio n. 5
0
//! [0]
AddressWidget::AddressWidget(QWidget *parent)
    : QTabWidget(parent)
{
    table = new TableModel(this);
    newAddressTab = new NewAddressTab(this);
    connect(newAddressTab, &NewAddressTab::sendDetails,
        this, &AddressWidget::addEntry);

    addTab(newAddressTab, "Address Book");

    setupTabs();
}
CurrentPlayDialog::CurrentPlayDialog(ChildWindowBase *parent):
		ChildWindowBase(parent),
		m_GroupTab(new QTabWidget(this))
{
	setupTabs();

	QHBoxLayout* bottomLayout = new QHBoxLayout;
	QVBoxLayout* mainLayout = new QVBoxLayout;

	bottomLayout->addStretch(1);

	mainLayout->addWidget(m_GroupTab);
	mainLayout->addLayout(bottomLayout);
	setLayout(mainLayout);
	setWindowTitle(tr("当前播放文件"));
	resize(450,350);
}
Esempio n. 7
0
void VolumeViewer::onArragePlanButton()
{
	SelectSubWindowDialog selectSubWindowDialog;
	if(selectSubWindowDialog.exec() != QDialog::Accepted)
	{
		return;
	}

	int windowNo = selectSubWindowDialog.getSelectedWindowNo();

	SelectClientDialog* selectClientDialog = new SelectClientDialog(true, this);
	if(selectClientDialog->exec() == QDialog::Accepted)
	{
		std::vector<int> checkedClientList = selectClientDialog->getCheckedClientId();

		VolumeArrangeDialog* volumeArrangeDialog = new VolumeArrangeDialog(this);
		if(volumeArrangeDialog->exec() == QDialog::Accepted)
		{
			std::vector<VolumeNode> volumePlan = volumeArrangeDialog->getVolumePlan();

			VolumeCenter *volumeCenter = g_DataCenter->createVolumeCenter();
			boost::shared_ptr<ClientCenter> clientCenter = g_DataCenter->createClientCenter();
			for(size_t i = 0; i < checkedClientList.size(); ++i)
			{
				if(windowNo == g_MainWindowNo)
					volumeCenter->newVolumePlan(checkedClientList[i], volumePlan);
				ClientCenter::Iterator it = clientCenter->findClient(checkedClientList[i]);
				if( it != clientCenter->end())
				{
					(*it)->sendCommand(new SendVolumeList(windowNo, volumePlan));
				}
			}

			int currentIndex = m_GroupTab->currentIndex();
			m_GroupTab->clear();
			setupTabs();
			m_GroupTab->setCurrentIndex(currentIndex);
		}

		delete volumeArrangeDialog;
	}

	delete selectClientDialog;
}
ClangDiagnosticConfigsWidget::ClangDiagnosticConfigsWidget(
        const ClangDiagnosticConfigsModel &diagnosticConfigsModel,
        const Core::Id &configToSelect,
        QWidget *parent)
    : QWidget(parent)
    , m_ui(new Ui::ClangDiagnosticConfigsWidget)
    , m_diagnosticConfigsModel(diagnosticConfigsModel)
{
    m_ui->setupUi(this);
    setupTabs();

    connectConfigChooserCurrentIndex();
    connect(m_ui->copyButton, &QPushButton::clicked,
            this, &ClangDiagnosticConfigsWidget::onCopyButtonClicked);
    connect(m_ui->removeButton, &QPushButton::clicked,
            this, &ClangDiagnosticConfigsWidget::onRemoveButtonClicked);
    connectDiagnosticOptionsChanged();

    syncWidgetsToModel(configToSelect);
}
Esempio n. 9
0
VolumeViewer::VolumeViewer(ChildWindowBase *parent):
		ChildWindowBase(parent),
		m_GroupTab(new QTabWidget(this))
{
	setupTabs();
	m_ArrangePlanButton = new QPushButton(tr("安排音量计划表"), this);

	connect(m_ArrangePlanButton, SIGNAL(clicked()), this, SLOT(onArragePlanButton()));

	QHBoxLayout* bottomLayout = new QHBoxLayout;
	QVBoxLayout* mainLayout = new QVBoxLayout;

	bottomLayout->addStretch(1);
	bottomLayout->addWidget(m_ArrangePlanButton);

	mainLayout->addWidget(m_GroupTab);
	mainLayout->addLayout(bottomLayout);
	setLayout(mainLayout);
	setWindowTitle(tr("音量计划表"));
	resize(450,350);
}
Esempio n. 10
0
SettingsWidget::SettingsWidget(QWidget *parent) :
    QDialog(parent),
    m_tabWidget(new QTabWidget(this)),
    m_wifiPasswordWidget(new WiFiPasswordWidget),
    m_compilerSettingsWidget(new CompilerSettingsWidget)
{
    //!Diable "?" button
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    QGridLayout *mainLayout = new QGridLayout(this);
    setLayout(mainLayout);

    mainLayout->addWidget(m_tabWidget);

    QPushButton *applyButton = new QPushButton("Применить", this);
    mainLayout->addWidget(applyButton);

    setupTabs();

    QString ip = SettingsManager::instance().ipAddress();
    QString login = SettingsManager::instance().userLogin();
    QString password = SettingsManager::instance().userPassword();

    QString pscpPath = SettingsManager::instance().pscpPath();
    QString plinkPath = SettingsManager::instance().plinkPath();

    m_wifiPasswordWidget->setTxInfo(pscpPath, plinkPath);
    m_wifiPasswordWidget->setLoginInfo(ip, login, password);

    QString sysroot = SettingsManager::instance().sysrootPath();
    QString ccOpt = SettingsManager::instance().compilerOptions();
    QString cc = SettingsManager::instance().compilerPath();
    QString make = SettingsManager::instance().mingwMakePath();

    m_compilerSettingsWidget->setCompilationSettings(cc, sysroot, ccOpt, make);

    QObject::connect(applyButton, SIGNAL(pressed()),this, SLOT(applySettings()));
}