Ejemplo n.º 1
0
void Imposition::accepted()
{
	if (isEdited == true) changePage();

	ScribusMainWindow* scMW = ScCore->primaryMainWindow();
			
	w->setMainWindow(scMW);
	
	w->setView(view);
	
	scMW->alignDistributePalette->setDoc(targetDoc);
	
	scMW->ActWin = w;
	
	targetDoc->WinHan = w;
	
	scMW->wsp->addWindow(w);
	
	scMW->HaveDoc++;
	scMW->HaveNewDoc();
	targetDoc->reformPages();
	
	w->show();
	view->show();
	scMW->newActWin(w);
	targetDoc->setCurrentPage(targetDoc->DocPages.at(0));
	view->zoom();
	view->GotoPage(0);

	connect(scMW->wsp, SIGNAL(windowActivated(QWidget *)), scMW, SLOT(newActWin(QWidget *)));
	connect(w, SIGNAL(AutoSaved()), scMW, SLOT(slotAutoSaved()));
	connect(UndoManager::instance(), SIGNAL(undoRedoDone()), view, SLOT(DrawNew()));
	targetDoc->connectDocSignals();
	UndoManager::instance()->setUndoEnabled(true);
}
Ejemplo n.º 2
0
/*
 * Exp : Slot for filtering data by task name
 * Parmeter : Task name index but unused
 * Return value : None
 * Notice :
 */
void TraceView::filterByTaskSlot(int index)
{
    Q_UNUSED(index);

    setPage(this->cpuComboBox->currentIndex(), this->taskComboBox->currentText());
    changePage(this->filterList, 0);
}
Ejemplo n.º 3
0
/*
 * Exp : Slot for updating trace view data after parsing is done
 * Parmeter : None
 * Return value : None
 * Notice :
 */
void TraceView::updateViewDataSlot()
{
    // Set data
    //-------------------------------------------------------------------------------------------------------

    int pageNow = this->data->ftraceDataList->size();
    if(pageNow > this->pageSize)
        pageNow = this->pageSize;

    insertDataToModel(this->data->ftraceDataList, 0, pageNow);

    //-------------------------------------------------------------------------------------------------------

    // Set Task Plot
    if(!(this->taskPlotButton->isEnabled())) {
        this->taskPlotButton->setEnabled(true);
        connect(this->taskPlotButton, SIGNAL(clicked()), this, SLOT(taskPlotSlot()));
    }

    // Set Filtering
    //-------------------------------------------------------------------------------------------------------
    // Set Page
    setPage(0, "All Tasks");
    changePage(this->filterList, 0);

    // Set Cpu filter
    this->cpuComboBox->setEnabled(true);
    connect(this->cpuComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterByCpuSlot(int)));

    this->taskComboBox->clear();
    this->taskComboBox->addItem("All Tasks");
    this->taskComboBox->setEnabled(true);
    this->taskComboBox->addItems(this->data->taskHistoryMap->keys());
    connect(this->taskComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterByTaskSlot(int)));
}
Ejemplo n.º 4
0
Archivo: MPF.cpp Proyecto: aaly/MPF
int MPF::prevPage()
{
	//listGridLayout->update();
	nextPushButton->setEnabled(true);
	cout << currentGroup  << ":" << groups.at(currentGroup)->currentPage << endl;

	int direction = -1;

	if (groups.at(currentGroup)->currentPage == 0)
	{
		if(currentGroup > 0)
		{
			setGroup(groups.at(currentGroup-1));
			//groups.at(currentGroup)->currentPage = groups.at(currentGroup)->pages.size()-1;
			//direction = 0;
		}

		if(currentGroup <= 0)
		{
			previousPushButton->setEnabled(false);
			prevButtonIcon->setEnabled(false);
		}
		return 0;
	}

	changePage(direction);
    groups.at(currentGroup)->getCurrentPage()->Clean();
	return groups.at(currentGroup)->currentPage;
}
Ejemplo n.º 5
0
void PreferenceDialog::__fillOptionList()
{
	optionList->setItemDelegate(new OptionDelegate(optionList));
	optionList->addItem(new QListWidgetItem(QIcon(":/images/syntax_highlighting.png"), tr("syntax highlighting")));
	optionList->addItem(new QListWidgetItem(QIcon(":/images/syntax_highlighting.png"), tr("autres")));

	changePage(0);
}
Ejemplo n.º 6
0
Archivo: MPF.cpp Proyecto: aaly/MPF
int MPF::setGroup(pagesGroup* grp)
{
	if(groups.indexOf(grp) != -1 )
	{
		//if current group is set disconenct it....
		if(currentGroup != -1)
		{
			QObject::disconnect(groups.at(currentGroup), 0, 0, 0);
		}

		if(listGridLayout->itemAt(0))
		{

			//listGridLayout->removeItem(groups.at(currentGroup)->listGridLayout);
			//QLayoutItem * item = listGridLayout->takeAt(0);
			//delete item;
		}
		if(currentGroup != -1)
		{
			groups.at(currentGroup)->hideList();
			////groups.at(currentGroup)->listGridLayout->setParent(groups.at(currentGroup));
			//QLayoutItem* item =  listGridLayout->takeAt(0);
			//item->layout()->widget()->setHidden(true);

			//listGridLayout->itemAt(0)->layout()->widget()->setHidden(true);
			////groups.at(currentGroup)->setHidden(true);
			//listGridLayout->removeItem(listGridLayout->itemAt(0));
			//groups.at(currentGroup)->listGridLayout->setParent(groups.at(currentGroup));
			//groups.at(currentGroup)->setHidden(true);
			////listGridLayout->update();
			//groups.at(currentGroup)->setHidden(true);
			//groups.at(currentGroup)->listGridLayout->setParent(NULL);
			//groups.at(currentGroup)->setHidden(true);
		}
		currentGroup = groups.indexOf(grp);
		grp->showList();
		// set list and messages widgets ...
		grp->listGridLayout->setParent(NULL);
		listGridLayout->addLayout(grp->listGridLayout);


		// connect to groups signals
		connect(grp, SIGNAL(newMessage(QString,int, int, pagesGroup*)), this, SLOT(addMessage(QString,int)), Qt::QueuedConnection);
		connect(grp, SIGNAL(clearPageMessages()), this, SLOT(clearMessages()), Qt::QueuedConnection);
		connect(grp, SIGNAL(pageReady(bool, int, pagesGroup*)), nextPushButton, SLOT(setEnabled(bool)));
		connect(grp, SIGNAL(pageReady(bool, int, pagesGroup*)), nextPushButton, SLOT(setFocus()));
		//prevPage();
		changePage(0);
	}
	else
	{
		return 1;
Ejemplo n.º 7
0
int ConfigDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: changePage((*reinterpret_cast< QListWidgetItem*(*)>(_a[1])),(*reinterpret_cast< QListWidgetItem*(*)>(_a[2]))); break;
        }
        _id -= 1;
    }
    return _id;
}
Ejemplo n.º 8
0
void BaseMainPage::backToPage()
{
	int idNext;
	//清除当前页面;
	if(m_pCtrlPage)
	{
		idNext = m_pCtrlPage->GetPrevPageIndex();
	}else
		idNext = STARTUPPAGE_INDEX;

	if(idNext== SETUPPAGE_INDEX || idNext== RUNPAGE_INDEX ||idNext== RUNPARAMPAGE_INDEX)
		setNavigatorMode(true);
	else
		changePage( idNext );
}
Ejemplo n.º 9
0
void page0::reload()
{
    ui->progressBar->setVisible(first_time);
    if (first_time == true)
    {
        userPageList.removeDuplicates();
        ui->progressBar->setMaximum(userPageList.count() + 1);
        ui->progressBar->setMinimum(0);
    }
    /* stop the unused refresh timer */
    refresh_timer->stop();
    
    /* prepare the splash screen time out */
    QTimer::singleShot(10, this, SLOT(changePage()));
}
Ejemplo n.º 10
0
Archivo: MPF.cpp Proyecto: aaly/MPF
int MPF::nextPage()
{
	groups.at(currentGroup)->getCurrentPage()->finishUp();

	if(groups.at(currentGroup)->currentPage < groups.at(currentGroup)->pages.size()-1)
	{
		if(!groups.at(currentGroup)->pages.at(groups.at(currentGroup)->currentPage+1)->init)
		{
			nextPushButton->setDisabled(true);
			nextButtonIcon->setEnabled(true);
		}
	}

	previousPushButton->setEnabled(true);
	prevButtonIcon->setEnabled(true);

	if (groups.at(currentGroup)->currentPage == groups.at(currentGroup)->pages.size()-1)
	{
		if(currentGroup < groups.size()-1)
		{
			setGroup(groups.at(currentGroup+1));
		}

		if(currentGroup == groups.size()-1)
		{
			nextPushButton->setDisabled(true);
			nextButtonIcon->setDisabled(true);
		}
		return 1;
	}
	else if (groups.at(currentGroup)->currentPage == groups.at(currentGroup)->pages.size()-2)
	{
		nextPushButton->setEnabled(false);
		nextButtonIcon->setEnabled(false);
	}



	changePage(1);

	return groups.at(currentGroup)->currentPage;
}
Ejemplo n.º 11
0
void  BaseMainPage::navigatorPageAt(int index, bool force)
{
	if(index < 0 || index >=4)
		return;

	if(!checkPermission() && !force)
		return;

	changeNavigator(index);

	QList<int> navigatorPageIndex;
	navigatorPageIndex.append(RUNPAGE_INDEX);
	navigatorPageIndex.append(RUNPARAMPAGE_INDEX);
	navigatorPageIndex.append(SETUPPAGE_INDEX);
	navigatorPageIndex.append(DEBUGPRESS_INDEX);

	ui.bottomWidget->changeNavigatorDisp(index);//改变导航栏显示;
	changePage(navigatorPageIndex.at(index));

}
Ejemplo n.º 12
0
bool SCAnimationDirector::navigate(Navigation navigation)
{
    bool finished = false;
    if (m_pageEffectRunner) {
        m_pageEffectRunner->finish();
        finishAnimations();
        // finish on first step
        m_timeLine.stop();
        finished = true;
    }
    else if (m_timeLine.state() == QTimeLine::Running) { // there are still shape animations running
        finishAnimations();
        m_timeLine.stop();
        finished = true;
    }

    bool presentationFinished = false;

    switch (navigation)
    {
        case FirstPage:
        case PreviousPage:
        case NextPage:
        case LastPage:
            presentationFinished = changePage(navigation);
            break;
        case PreviousStep:
            previousStep();
            break;
        case NextStep:
            if (!finished) {
                presentationFinished = nextStep();
            }
            break;
        default:
            break;
    }

    return presentationFinished;
}
Ejemplo n.º 13
0
RankingDialog::RankingDialog(const QStringList &tiers)
{
    QVBoxLayout *mainLayout = new QVBoxLayout(this);
    QHBoxLayout *row1 = new QHBoxLayout();
    mainLayout->addLayout(row1);

    QPushButton *search;
    row1->addWidget(name = new QLineEdit());
    row1->addWidget(search = new QPushButton(tr("&Search")));
    row1->addWidget(tierSelection = new QComboBox());
    tierSelection->addItems(tiers);

    players = new QCompactTable(0,3);
    players->setAlternatingRowColors(true);
    players->setHorizontalHeaderLabels(QStringList() << tr("Rank") << tr("Player Name") << tr("Points"));
    players->horizontalHeader()->setStretchLastSection(true);
    mainLayout->addWidget(players);

    QHBoxLayout *row3 = new QHBoxLayout();
    mainLayout->addLayout(row3);

    QPushButton *prev, *next;
    row3->addWidget(prev = new QPushButton("<<"));
    row3->addWidget(next = new QPushButton(">>"));
    row3->addWidget(page = new QLineEdit(), 0, Qt::AlignRight);
    row3->addWidget(totalPages = new QLabel("/ ---"), 0, Qt::AlignLeft);

    resize(400,500);
    page->setMaximumWidth(40);
    setAttribute(Qt::WA_DeleteOnClose, true);

    connect(next, SIGNAL(clicked()), SLOT(nextPage()));
    connect(prev, SIGNAL(clicked()), SLOT(prevPage()));
    connect(tierSelection, SIGNAL(activated(int)), SLOT(searchByName()));
    connect(name, SIGNAL(returnPressed()), SLOT(searchByName()));
    connect(search, SIGNAL(clicked()), SLOT(searchByName()));
    connect(this->page, SIGNAL(returnPressed()), SLOT(changePage()));
}
Ejemplo n.º 14
0
void MainWindow::createConnections()
{

    connect(view, SIGNAL(loadProgress(int)), progressBar, SLOT(setValue(int)));
    connect(view, SIGNAL(titleChanged(QString)), SLOT(setBrowserTitle()));
    connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int)));
    connect(view, SIGNAL(loadFinished(bool)), SLOT(finishedLoading(bool)));
    connect(locationEdit, SIGNAL(returnPressed()), SLOT(changePage()));
    connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
    connect(pageHistoryMenu, SIGNAL(aboutToShow()), SLOT(setWebHistory()));
    connect(pageTimer, SIGNAL(timeout()), SLOT(networkTimeOut()));
    connect(hostInfoAction, SIGNAL(triggered()), this, SLOT(showHostInfo()));
    connect(showHistoryAction, SIGNAL(triggered()), this,
            SLOT(showWebHistory()));
    connect(clearHistoryAction, SIGNAL(triggered()), this,
            SLOT(clearWebHistory()));
    /*
    connect(view->pageAction(QWebPage::Back), SIGNAL(triggered()), this,
            SLOT(getBackPageUrl()));
    connect(view->pageAction(QWebPage::Forward), SIGNAL(triggered()), this,
            SLOT(getForwardPageUrl()));
    */
    connect(addNewBookmarkAction, SIGNAL(triggered()), SLOT(addNewBookmark()));
}
Ejemplo n.º 15
0
void PageManager::onMessageReceived(const Message *msg)
{
    MessageType mType = msg->type();
    if ( MessageType::kMessageTypeChangePage == mType )
    {
        auto realMsg = dynamic_cast<const MsgChangePage*>( msg );
        CCAssert(realMsg, "");
        changePage(realMsg->pageName_);
    }
    else if ( MessageType::kMessageTypePopPage == mType )
    {

    }
    else if ( MessageType::kMessageTypePushPage == mType )
    {

    }
    else if ( MessageType::kMessageTypeChangeBackground == mType )
    {
        auto realMsg = dynamic_cast<const MsgChangeBackground*>( msg );
        CCAssert(realMsg, "");
        changeBackGround(realMsg->backgroundPic_);
    }
}
Ejemplo n.º 16
0
void WizardSample::forward()
{
	changePage(ui.pagesWidget->currentWidget(), Direction::Forward);
}
Ejemplo n.º 17
0
void OutputPaneManager::init()
{
    ActionManager *am = Core::ICore::instance()->actionManager();
    ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
    const Context globalcontext(Core::Constants::C_GLOBAL);

    // Window->Output Panes
    ActionContainer *mpanes = am->createMenu(Constants::M_WINDOW_PANES);
    mwindow->addMenu(mpanes, Constants::G_WINDOW_PANES);
    mpanes->menu()->setTitle(tr("Output &Panes"));
    mpanes->appendGroup("Coreplugin.OutputPane.ActionsGroup");
    mpanes->appendGroup("Coreplugin.OutputPane.PanesGroup");

    Core::Command *cmd;

    cmd = am->registerAction(m_clearAction, "Coreplugin.OutputPane.clear", globalcontext);
    m_clearButton->setDefaultAction(cmd->action());
    mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");

    cmd = am->registerAction(m_prevAction, "Coreplugin.OutputPane.previtem", globalcontext);
    cmd->setDefaultKeySequence(QKeySequence("Shift+F6"));
    m_prevToolButton->setDefaultAction(cmd->action());
    mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");

    cmd = am->registerAction(m_nextAction, "Coreplugin.OutputPane.nextitem", globalcontext);
    m_nextToolButton->setDefaultAction(cmd->action());
    cmd->setDefaultKeySequence(QKeySequence("F6"));
    mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");

    cmd = am->registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax", globalcontext);
#ifdef Q_WS_MAC
    cmd->setDefaultKeySequence(QKeySequence("Ctrl+9"));
#else
    cmd->setDefaultKeySequence(QKeySequence("Alt+9"));
#endif
    cmd->setAttribute(Command::CA_UpdateText);
    cmd->setAttribute(Command::CA_UpdateIcon);
    mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
    connect(m_minMaxAction, SIGNAL(triggered()), this, SLOT(slotMinMax()));
    m_minMaxButton->setDefaultAction(cmd->action());

    QAction *sep = new QAction(this);
    sep->setSeparator(true);
    cmd = am->registerAction(sep, "Coreplugin.OutputPane.Sep", globalcontext);
    mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");

    QList<IOutputPane*> panes = ExtensionSystem::PluginManager::instance()
        ->getObjects<IOutputPane>();
    QMultiMap<int, IOutputPane*> sorted;
    foreach (IOutputPane* outPane, panes)
        sorted.insertMulti(outPane->priorityInStatusBar(), outPane);

    QMultiMap<int, IOutputPane*>::const_iterator it, begin;
    begin = sorted.constBegin();
    it = sorted.constEnd();
    int shortcutNumber = 1;
    while (it != begin) {
        --it;
        IOutputPane* outPane = it.value();
        const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));

        m_pageMap.insert(idx, outPane);
        connect(outPane, SIGNAL(showPage(bool,bool)), this, SLOT(showPage(bool,bool)));
        connect(outPane, SIGNAL(hidePage()), this, SLOT(slotHide()));
        connect(outPane, SIGNAL(togglePage(bool)), this, SLOT(togglePage(bool)));
        connect(outPane, SIGNAL(navigateStateUpdate()), this, SLOT(updateNavigateState()));

        QWidget *toolButtonsContainer = new QWidget(m_opToolBarWidgets);
        QHBoxLayout *toolButtonsLayout = new QHBoxLayout;
        toolButtonsLayout->setMargin(0);
        toolButtonsLayout->setSpacing(0);
        foreach (QWidget *toolButton, outPane->toolBarWidgets())
            toolButtonsLayout->addWidget(toolButton);
        toolButtonsLayout->addStretch(5);
        toolButtonsContainer->setLayout(toolButtonsLayout);

        m_opToolBarWidgets->addWidget(toolButtonsContainer);

        QString actionId = QString("QtCreator.Pane.%1").arg(outPane->displayName().simplified());
        actionId.remove(QLatin1Char(' '));
        QAction *action = new QAction(outPane->displayName(), this);

        Command *cmd = am->registerAction(action, Id(actionId), Context(Constants::C_GLOBAL));

        mpanes->addAction(cmd, "Coreplugin.OutputPane.PanesGroup");
        m_actions.insert(cmd->action(), idx);

        if (outPane->priorityInStatusBar() != -1) {
            cmd->setDefaultKeySequence(QKeySequence(paneShortCut(shortcutNumber)));
            QToolButton *button = new OutputPaneToggleButton(shortcutNumber, outPane->displayName(),
                                                             cmd->action());
            ++shortcutNumber;
            m_buttonsWidget->layout()->addWidget(button);
            connect(button, SIGNAL(clicked()), this, SLOT(buttonTriggered()));
            m_buttons.insert(idx, button);
        }

        // Now add the entry to the combobox, since the first item we add sets the currentIndex, thus we need to be set up for that
        m_widgetComboBox->addItem(outPane->displayName(), idx);

        connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered()));
    }

    changePage();
}
Ejemplo n.º 18
0
void AboutPage::btn_pressed(int pageIndex) {
    emit changePage(pageIndex);
}
Ejemplo n.º 19
0
void WizardSample::back()
{
	changePage(ui.pagesWidget->currentWidget(), Direction::Backward);
}
Ejemplo n.º 20
0
static InspectorPanel *createInspectorForWindow(WWindow *wwin, int xpos, int ypos, Bool showSelectPanel)
{
	WScreen *scr = wwin->screen_ptr;
	InspectorPanel *panel;
	Window parent;
	char *str = NULL, *tmp = NULL;
	int x, y, btn_width, frame_width;
	WMButton *selectedBtn = NULL;

	spec_text = _("The configuration will apply to all\n"
		      "windows that have their WM_CLASS\n"
		      "property set to the above selected\n" "name, when saved.");

	panel = wmalloc(sizeof(InspectorPanel));
	memset(panel, 0, sizeof(InspectorPanel));

	panel->destroyed = 0;
	panel->inspected = wwin;
	panel->nextPtr = panelList;
	panelList = panel;
	panel->win = WMCreateWindow(scr->wmscreen, "windowInspector");
	WMResizeWidget(panel->win, PWIDTH, PHEIGHT);

	/**** create common stuff ****/
	/* command buttons */
	btn_width = (PWIDTH - (2 * 15) - (2 * 10)) / 3;
	panel->saveBtn = WMCreateCommandButton(panel->win);
	WMSetButtonAction(panel->saveBtn, saveSettings, panel);
	WMMoveWidget(panel->saveBtn, (2 * (btn_width + 10)) + 15, PHEIGHT - 40);
	WMSetButtonText(panel->saveBtn, _("Save"));
	WMResizeWidget(panel->saveBtn, btn_width, 28);
	if (wPreferences.flags.noupdates || !(wwin->wm_class || wwin->wm_instance))
		WMSetButtonEnabled(panel->saveBtn, False);

	panel->applyBtn = WMCreateCommandButton(panel->win);
	WMSetButtonAction(panel->applyBtn, applySettings, panel);
	WMMoveWidget(panel->applyBtn, btn_width + 10 + 15, PHEIGHT - 40);
	WMSetButtonText(panel->applyBtn, _("Apply"));
	WMResizeWidget(panel->applyBtn, btn_width, 28);

	panel->revertBtn = WMCreateCommandButton(panel->win);
	WMSetButtonAction(panel->revertBtn, revertSettings, panel);
	WMMoveWidget(panel->revertBtn, 15, PHEIGHT - 40);
	WMSetButtonText(panel->revertBtn, _("Reload"));
	WMResizeWidget(panel->revertBtn, btn_width, 28);

	/* page selection popup button */
	panel->pagePopUp = WMCreatePopUpButton(panel->win);
	WMSetPopUpButtonAction(panel->pagePopUp, changePage, panel);
	WMMoveWidget(panel->pagePopUp, 25, 15);
	WMResizeWidget(panel->pagePopUp, PWIDTH - 50, 20);

	WMAddPopUpButtonItem(panel->pagePopUp, _("Window Specification"));
	WMAddPopUpButtonItem(panel->pagePopUp, _("Window Attributes"));
	WMAddPopUpButtonItem(panel->pagePopUp, _("Advanced Options"));
	WMAddPopUpButtonItem(panel->pagePopUp, _("Icon and Initial Workspace"));
	WMAddPopUpButtonItem(panel->pagePopUp, _("Application Specific"));

	/**** window spec ****/
	frame_width = PWIDTH - (2 * 15);

	panel->specFrm = WMCreateFrame(panel->win);
	WMSetFrameTitle(panel->specFrm, _("Window Specification"));
	WMMoveWidget(panel->specFrm, 15, 65);
	WMResizeWidget(panel->specFrm, frame_width, 145);

	panel->defaultRb = WMCreateRadioButton(panel->specFrm);
	WMMoveWidget(panel->defaultRb, 10, 78);
	WMResizeWidget(panel->defaultRb, frame_width - (2 * 10), 20);
	WMSetButtonText(panel->defaultRb, _("Defaults for all windows"));
	WMSetButtonSelected(panel->defaultRb, False);
	WMSetButtonAction(panel->defaultRb, selectSpecification, panel);

	if (wwin->wm_class && wwin->wm_instance) {
		tmp = wstrconcat(wwin->wm_instance, ".");
		str = wstrconcat(tmp, wwin->wm_class);

		panel->bothRb = WMCreateRadioButton(panel->specFrm);
		WMMoveWidget(panel->bothRb, 10, 18);
		WMResizeWidget(panel->bothRb, frame_width - (2 * 10), 20);
		WMSetButtonText(panel->bothRb, str);
		wfree(tmp);
		wfree(str);
		WMGroupButtons(panel->defaultRb, panel->bothRb);

		if (!selectedBtn)
			selectedBtn = panel->bothRb;

		WMSetButtonAction(panel->bothRb, selectSpecification, panel);
	}

	if (wwin->wm_instance) {
		panel->instRb = WMCreateRadioButton(panel->specFrm);
		WMMoveWidget(panel->instRb, 10, 38);
		WMResizeWidget(panel->instRb, frame_width - (2 * 10), 20);
		WMSetButtonText(panel->instRb, wwin->wm_instance);
		WMGroupButtons(panel->defaultRb, panel->instRb);

		if (!selectedBtn)
			selectedBtn = panel->instRb;

		WMSetButtonAction(panel->instRb, selectSpecification, panel);
	}

	if (wwin->wm_class) {
		panel->clsRb = WMCreateRadioButton(panel->specFrm);
		WMMoveWidget(panel->clsRb, 10, 58);
		WMResizeWidget(panel->clsRb, frame_width - (2 * 10), 20);
		WMSetButtonText(panel->clsRb, wwin->wm_class);
		WMGroupButtons(panel->defaultRb, panel->clsRb);

		if (!selectedBtn)
			selectedBtn = panel->clsRb;

		WMSetButtonAction(panel->clsRb, selectSpecification, panel);
	}

	panel->selWinB = WMCreateCommandButton(panel->specFrm);
	WMMoveWidget(panel->selWinB, 20, 145 - 24 - 10);
	WMResizeWidget(panel->selWinB, frame_width - 2 * 10 - 20, 24);
	WMSetButtonText(panel->selWinB, _("Select window"));
	WMSetButtonAction(panel->selWinB, selectWindow, panel);

	panel->specLbl = WMCreateLabel(panel->win);
	WMMoveWidget(panel->specLbl, 15, 210);
	WMResizeWidget(panel->specLbl, frame_width, 100);
	WMSetLabelText(panel->specLbl, spec_text);
	WMSetLabelWraps(panel->specLbl, True);

	WMSetLabelTextAlignment(panel->specLbl, WALeft);

	/**** attributes ****/
	create_tab_window_attributes(wwin, panel, frame_width);
	create_tab_window_advanced(wwin, panel, frame_width);
	create_tab_icon_workspace(wwin, panel);
	create_tab_app_specific(wwin, panel, frame_width);

	/* if the window is a transient, don't let it have a miniaturize button */
	if (wwin->transient_for != None && wwin->transient_for != scr->root_win)
		WMSetButtonEnabled(panel->attrChk[3], False);
	else
		WMSetButtonEnabled(panel->attrChk[3], True);

	if (!wwin->wm_class && !wwin->wm_instance)
		WMSetPopUpButtonItemEnabled(panel->pagePopUp, 0, False);

	WMRealizeWidget(panel->win);

	WMMapSubwidgets(panel->win);
	WMMapSubwidgets(panel->specFrm);
	WMMapSubwidgets(panel->attrFrm);
	WMMapSubwidgets(panel->moreFrm);
	WMMapSubwidgets(panel->iconFrm);
	WMMapSubwidgets(panel->wsFrm);
	if (panel->appFrm)
		WMMapSubwidgets(panel->appFrm);

	if (showSelectPanel) {
		WMSetPopUpButtonSelectedItem(panel->pagePopUp, 0);
		changePage(panel->pagePopUp, panel);
	} else {
		WMSetPopUpButtonSelectedItem(panel->pagePopUp, 1);
		changePage(panel->pagePopUp, panel);
	}

	parent = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, PWIDTH, PHEIGHT, 0, 0, 0);
	XSelectInput(dpy, parent, KeyPressMask | KeyReleaseMask);
	panel->parent = parent;
	XReparentWindow(dpy, WMWidgetXID(panel->win), parent, 0, 0);

	WMMapWidget(panel->win);

	XSetTransientForHint(dpy, parent, wwin->client_win);

	if (xpos == UNDEFINED_POS) {
		x = wwin->frame_x + wwin->frame->core->width / 2;
		y = wwin->frame_y + wwin->frame->top_width * 2;
		if (y + PHEIGHT > scr->scr_height)
			y = scr->scr_height - PHEIGHT - 30;
		if (x + PWIDTH > scr->scr_width)
			x = scr->scr_width - PWIDTH;
	} else {
		x = xpos;
		y = ypos;
	}

	panel->frame = wManageInternalWindow(scr, parent, wwin->client_win, "Inspector", x, y, PWIDTH, PHEIGHT);

	if (!selectedBtn)
		selectedBtn = panel->defaultRb;

	WMSetButtonSelected(selectedBtn, True);
	selectSpecification(selectedBtn, panel);

	/* kluge to know who should get the key events */
	panel->frame->client_leader = WMWidgetXID(panel->win);

	WSETUFLAG(panel->frame, no_closable, 0);
	WSETUFLAG(panel->frame, no_close_button, 0);
	wWindowUpdateButtonImages(panel->frame);
	wFrameWindowShowButton(panel->frame->frame, WFF_RIGHT_BUTTON);
	panel->frame->frame->on_click_right = destroyInspector;

	wWindowMap(panel->frame);

	showIconFor(WMWidgetScreen(panel->alwChk), panel, wwin->wm_instance, wwin->wm_class, UPDATE_TEXT_FIELD);

	return panel;
}
Ejemplo n.º 21
0
void BaseMainPage::shortCutSuper()
{
	changePage(PWDPAGE_INDEX);
}
Ejemplo n.º 22
0
/*
 * Exp : Slot for change page
 * Parmeter : Page index
 * Return value : None
 * Notice :
 */
void TraceView::changePageSlot(int index)
{
    changePage(this->filterList, index);
}
Ejemplo n.º 23
0
/*
 * Exp : Slot for filtering data by CPU number
 * Parmeter : CPU number index
 * Return value : None
 * Notice :
 */
void TraceView::filterByCpuSlot(int index)
{
    setPage(index, this->taskComboBox->currentText());
    changePage(this->filterList, 0);
}
Ejemplo n.º 24
0
void Form0::on_actionToForm2_triggered()
{
    emit changePage(Page2);
}
Ejemplo n.º 25
0
void OptionsDialog::on_optionsTree_itemEntered(QTreeWidgetItem* item, int column) {
    changePage(item, column);
}
Ejemplo n.º 26
0
void DlgSettings::setTab(int index) {
    if (index <= contentsWidget->count()-1 && index >= 0) {
        changePage(contentsWidget->item(index), contentsWidget->currentItem());
        contentsWidget->setCurrentRow(index);
    }
}