void CInputDocView::populatePanels() { int iSelectedTab = m_tabCtrl.GetCurSel(); removePanels(); CInputDoc* pDoc = (CInputDoc*) GetDocument(); // add the base file (which will be: // source file for a parsing operation // ana or ptext for a transfer or synthesis operation //CResultStream* pBaseStream = pDoc->getBaseStream(); #ifndef rde270 // the first panel (i.e. the file we're processing), should be synchronously streamed in // (the meaning of the 3rd parameter), since it has to be closed (finished loading into // the control) by the time we try to process it. addPanel(m_pBaseStream, kBasePanelID+0, true); #else addPanel(m_pBaseStream, kBasePanelID+0); #endif //delete pBaseStream; // add the various result panels CProcessStatus* pResults = pDoc->getProcessResults(); if(pResults) { CPrefsInputDocDisplay* pPrefs = pDoc->getDisplayPrefs(); int iPanelCount=1; // one for the input file for (int i =0; i< pResults->m_pResultStreams.GetSize(); i++) { CResultStreamDescriptor* pD =pResults->m_pResultStreams[i]->getDescriptor() ; if( pPrefs->getShowPanel(pD)) { iPanelCount++; addPanel(pResults->m_pResultStreams[i], kBasePanelID+i+1/*id 0 is the basestream */); } } // try to reselect the tab the user had before // this is simplistic, and could be redone to store the descriptor // they had chosen and reselect that. if(iPanelCount > iSelectedTab) // iSelectedTab is zero-based { m_tabCtrl.SetCurSel(iSelectedTab); tabSelected(iSelectedTab); // don't know why this isn't triggered } else { m_tabCtrl.SetCurSel(0); // should always at least be the source panel tabSelected(0); // don't know why this isn't triggered } } }
/*! * \brief Sets up graphical user interface. */ void Blank::setupGUI() { //set up user interface ui->setupUi(this); //initialise interface and settings intrfc = new BlankInterface(this); settings = new BlankSettings(); //point base pointers to child pointers interfaceBase = intrfc; settingsBase = settings; //start listening for incomming messages intrfc->start(); //connect signals/slots qRegisterMetaType<QVector<float> >("QVector<float>"); qRegisterMetaType< QVector<float> >("QVector<QStringList>"); QObject::connect(this, SIGNAL(tabSelected()), this, SLOT(show())); QObject::connect(intrfc, SIGNAL(gpuListReceived(QVector<QStringList>)), this, SLOT(setGpuList(QVector<QStringList>))); QObject::connect(intrfc, SIGNAL(statusReceived(int)), this, SLOT(statusChanged(int))); QObject::connect(intrfc, SIGNAL(parametersReceived(/*YourParameters*/)), settings, SLOT(setParameters(/*YourParameters*/))); QObject::connect(settings->ui->pushButton_ok, SIGNAL(clicked()), settings, SLOT(accept())); QObject::connect(settings, SIGNAL(accepted()), settings, SLOT(save())); QObject::connect(settings->ui->pushButton_cancel, SIGNAL(clicked()), settings, SLOT(reject())); //get the parameters from the module intrfc->sendParametersRequest(); //check if the modeule's tab is currently selected checkFocus(mainWindow->tabWidget->currentIndex()); }
void TabBar::dropEvent(QDropEvent* event) { drawDropIndicator(-1); int x = event->pos().x(); if (isSameTab(event) || x < m_skin->tabBarPosition().x() || x > m_closeTabButton->x()) event->ignore(); else { int targetIndex = dropIndex(event->pos()); int sourceSessionId = event->mimeData()->text().toInt(); int sourceIndex = m_tabs.indexOf(sourceSessionId); if (targetIndex == -1) targetIndex = m_tabs.count() - 1; else if (targetIndex < 0) targetIndex = 0; else if (sourceIndex < targetIndex) --targetIndex; m_tabs.move(sourceIndex, targetIndex); emit tabSelected(m_tabs.at(targetIndex)); event->accept(); } return; }
void RulerT::mousePressEvent(QMouseEvent *m) { QRect fpo; mousePressed = true; rulerCode = 0; if (haveInd) { fpo = QRect(static_cast<int>(firstLine+leftIndent-offset)-4, 0, 8, 12); if (fpo.contains(m->pos())) { rulerCode = 1; mouseX = m->x(); return; } fpo = QRect(static_cast<int>(leftIndent-offset)-4, 12, 8, 12); if (fpo.contains(m->pos())) { rulerCode = 2; mouseX = m->x(); return; } } if (tabValues.count() != 0) { for (int yg = 0; yg < static_cast<int>(tabValues.count()); yg++) { fpo = QRect(static_cast<int>(tabValues[yg].tabPosition-offset)-3, 15, 8, 8); if (fpo.contains(m->pos())) { rulerCode = 3; actTab = yg; mouseX = m->x(); emit tabSelected(); emit typeChanged(tabValues[actTab].tabType); emit tabMoved(tabValues[actTab].tabPosition); emit fillCharChanged(tabValues[actTab].tabFillChar); repaint(); return; } } } if ((rulerCode == 0) && (m->button() == Qt::LeftButton)) { ParagraphStyle::TabRecord tb; tb.tabPosition = static_cast<double>(m->x() + offset); tb.tabType = 0; tb.tabFillChar = QChar(); tabValues.prepend(tb); actTab = 0; rulerCode = 3; updateTabList(); repaint(); emit newTab(); emit typeChanged(tabValues[actTab].tabType); emit tabMoved(tabValues[actTab].tabPosition); emit fillCharChanged(tabValues[actTab].tabFillChar); qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor)); } mouseX = m->x(); }
void HorizontalTabWidget::setCurrentIndex(int index) { int xPos = 0; for(unsigned i = 0; i < m_tabButtons.size(); i++) { QPushButton * button = m_tabButtons[i]; QString style; style.append("QPushButton { border: none; background-color: #808080; "); style.append(" border-right: 1px solid black;"); style.append(" border-bottom: 1px solid black;"); style.append(" padding-left: 10px;"); style.append(" padding-right: 10px;"); style.append(" padding-top: 5px;"); style.append(" font: bold;"); if( i == m_tabButtons.size() - 1 ) { style.append(" border-right: none;"); } style.append("}"); button->setStyleSheet(style); button->adjustSize(); button->move(xPos,0); xPos = xPos + button->width(); } m_tabBarLine->setFixedWidth(xPos); m_tabBarLine->raise(); QPushButton * button = m_tabButtons[index]; QString style; // NOTE: Yellow Orange Lighter #fdbc3b and the Darker Orange is #f47920 style.append("QPushButton { border: none; background-color: #f47920; "); style.append(" border-right: 1px solid black;"); style.append(" padding-left: 10px;"); style.append(" padding-right: 10px;"); style.append(" padding-top: 5px;"); style.append(" font: bold;"); if( index == int(m_tabButtons.size() - 1) ) { style.append(" border-right: none;"); } style.append("}"); button->setStyleSheet(style); button->raise(); emit tabSelected(m_ids[index]); }
WWidget *WButtonTab::createButton() { WContainerWidget *result = new WContainerWidget(); tabButton_ = new WText(label(), result); connect(tabButton_, SIGNAL(clicked()), this, SLOT(tabSelected()), STATIC); tabButton_->setMargin(WLength(10)); return result; }
void VerticalTabWidget::setCurrentIndex(int index) { int yPos = 25; for(unsigned i = 0; i < m_tabButtons.size(); i++) { QPushButton * button = m_tabButtons[i]; button->move(0,yPos); yPos = yPos + button->height(); QString imagePath; QString style; if (i == static_cast<unsigned>(index)) { imagePath = m_selectedPixmaps[i]; // Ignore clicks to the already active tab if(currentIndex != index){ currentIndex = index; style.append("QPushButton { background-color: blue; background-image: url(\""); style.append(imagePath); style.append("\"); border: none; background-repeat: 0; }"); button->setStyleSheet(style); currentIndex = index; emit tabSelected(m_ids[index]); } } else { if (button->isEnabled()){ imagePath = m_unSelectedPixmaps[i]; style.append("QPushButton { background-image: url(\""); style.append(imagePath); style.append("\"); border: none; background-color: red; background-repeat: 0; }"); } else { imagePath = m_disabledPixmaps[i]; style.append("QPushButton { background-image: url(\""); style.append(imagePath); style.append("\"); border: none; background-color: red; background-repeat: 0; }"); } button->setStyleSheet(style); } } }
void TabBar::addTab(int sessionId, const QString& title) { m_tabs.append(sessionId); if (title.isEmpty()) m_tabTitles.insert(sessionId, standardTabTitle()); else m_tabTitles.insert(sessionId, title); emit tabSelected(sessionId); }
void MainTabView::setCurrentIndex(int index) { int xPos = m_tabLabel->width() + TAB_SEPARATION; for(unsigned i = 0; i < m_tabButtons.size(); i++) { QPushButton * button = m_tabButtons[i]; QString style; style.append("QPushButton { border: none; background-color: #BBCDE3; "); style.append(" border-right: 1px solid black;"); style.append(" border-bottom: 1px solid black;"); style.append(" border-top: 1px solid black;"); style.append(" border-left: 1px solid black;"); style.append(" border-top-left-radius: 5px;"); style.append(" border-top-right-radius: 5px;"); style.append(" padding-left: 10px;"); style.append(" padding-right: 10px;"); style.append(" color: black;"); style.append("}"); button->setStyleSheet(style); button->adjustSize(); button->move(xPos,5); button->stackUnder(m_mainWidget); xPos += TAB_SEPARATION + button->width(); } QPushButton * button = m_tabButtons[index]; QString style; style.append("QPushButton { border: none; background-color: #E6E6E6; "); style.append(" border-right: 1px solid black;"); style.append(" border-bottom: none;"); style.append(" border-top: 1px solid black;"); style.append(" border-left: 1px solid black;"); style.append(" border-top-left-radius: 5px;"); style.append(" border-top-right-radius: 5px;"); style.append(" padding-left: 10px;"); style.append(" padding-right: 10px;"); style.append(" color: black;"); style.append("}"); button->setStyleSheet(style); button->raise(); m_stackedWidget->setCurrentIndex(index); emit tabSelected(m_ids[index]); }
/*! * \brief Checks if the module tab is currently selected. * \note This function emits signals that broadcast if module is selected or not. * \param[in] tabID - module tab identification number */ void GUI::checkFocus(int tabID) { if(tabID==mainWindow->tabWidget->indexOf(this)) { selected = true; emit tabSelected(); } else { selected = false; emit tabDeselected(); } }
void TabBar::selectPreviousTab() { int index = m_tabs.indexOf(m_selectedSessionId); int newSelectedSessionId = m_selectedSessionId; if (index == -1) return; else if (index == 0) newSelectedSessionId = m_tabs.at(m_tabs.count() - 1); else newSelectedSessionId = m_tabs.at(index - 1); emit tabSelected(newSelectedSessionId); }
void TabBar::selectNextTab() { int index = m_tabs.indexOf(m_selectedSessionId); int newSelectedSessionId = m_selectedSessionId; if (index == -1) return; else if (index == m_tabs.count() - 1) newSelectedSessionId = m_tabs.at(0); else newSelectedSessionId = m_tabs.at(index + 1); emit tabSelected(newSelectedSessionId); }
void HomeWindow::selected() { setUpdatesEnabled(false); if (loaded == false) { restoreState(); loaded = true; if (!currentStyle) tabSelected(0); } resizeEvent(NULL); // force a relayout rideSelected(); dateRangeChanged(DateRange()); setUpdatesEnabled(true); update(); }
void KTabCtl::showTab(int i) { unsigned int j; for (j = 0; j < pages.size(); j++) { if (j != (unsigned)i) { pages[j]->hide(); } } if((unsigned)i < pages.size()) { emit(tabSelected(i)); if( pages.size() >= 2 ) { pages[i]->raise(); } pages[i]->setGeometry(getChildRect()); pages[i]->show(); } }
void TabBar::removeTab(int sessionId) { if (sessionId == -1) sessionId = m_selectedSessionId; if (sessionId == -1) return; if (!m_tabs.contains(sessionId)) return; int index = m_tabs.indexOf(sessionId); if (m_lineEdit->isVisible() && sessionId == m_renamingSessionId) m_lineEdit->hide(); m_tabs.removeAt(index); m_tabTitles.remove(sessionId); if (m_tabs.count() == 0) emit lastTabClosed(); else emit tabSelected(m_tabs.last()); }
void HomeWindow::rideSelected() { if (amVisible()) { for (int i=0; i < charts.count(); i++) { // show if its not a tab if (currentStyle) charts[i]->show(); // keep tabs hidden, show the rest // if we are tabbed AND its the current tab then mimic tabselected // to force the tabwidget to refresh AND set its ride property (see below) //otherwise just go ahead and notify it of a new ride if (!currentStyle && charts.count() && i==tabbed->currentIndex()) tabSelected(tabbed->currentIndex(), true); // for ride change else charts[i]->setProperty("ride", property("ride")); } } }
void PatVerticalTabWidget::setCurrentIndex(int index) { int yPos = 25; for(int i = 0; i < m_buttonGroup->buttons().size(); i++) { QAbstractButton * button = m_buttonGroup->button(i); button->move(0,yPos); yPos += button->height(); // Ignore clicks to the already active tab if(button->isEnabled() && button->isChecked() && currentIndex != index){ currentIndex = index; emit tabSelected(i); } } QTimer::singleShot(0, this, SLOT(refreshIcons())); }
/*! * \brief Sets up graphical user interface. */ void ERA::setupGUI() { //set up user interface ui->setupUi(this); //initialise interface, settings and network monitor intrfc = new ERAInterface(this); settings = new ERASettings(); networkMonitor = new ERANetworkMonitor(); //point base pointers to child pointers interfaceBase = intrfc; settingsBase = settings; //start listening for incomming messages intrfc->start(); //connect signals/slots qRegisterMetaType< QVector<float> >("QVector<float>"); qRegisterMetaType< QVector<float> >("QVector<QStringList>"); QObject::connect(this, SIGNAL(tabSelected()), this, SLOT(show())); QObject::connect(intrfc, SIGNAL(gpuListReceived(QVector<QStringList>)), this, SLOT(setGpuList(QVector<QStringList>))); QObject::connect(intrfc, SIGNAL(statusReceived(int)), this, SLOT(statusChanged(int))); QObject::connect(intrfc, SIGNAL(parametersReceived(int)), settings, SLOT(setParameters(int))); QObject::connect(intrfc, SIGNAL(dataReceived(int, double*, double*)), networkMonitor, SLOT(updatePlot(int, double*, double*))); QObject::connect(settings->ui->pushButton_ok, SIGNAL(clicked()), settings, SLOT(accept())); QObject::connect(settings, SIGNAL(accepted()), settings, SLOT(save())); QObject::connect(settings->ui->pushButton_cancel, SIGNAL(clicked()), settings, SLOT(reject())); QObject::connect(settings, SIGNAL(simulationModeChanged(int)), intrfc, SLOT(sendSimulationMode(int))); //get the parameters from the module intrfc->sendParametersRequest(); //initialise viewports initialiseViewports(); //check if the modeule's tab is currently selected checkFocus(mainWindow->tabWidget->currentIndex()); }
void TabBar::mouseReleaseEvent(QMouseEvent* event) { if (QWhatsThis::inWhatsThisMode()) return; if (event->x() < m_skin->tabBarPosition().x()) return; int index = tabAt(event->x()); if (m_mousePressed && m_mousePressedIndex == index) { if (event->button() == Qt::LeftButton && index != m_tabs.indexOf(m_selectedSessionId)) emit tabSelected(m_tabs.at(index)); if (event->button() == Qt::MidButton) emit tabClosed(m_tabs.at(index)); } m_mousePressed = false; m_startPos.setX(0); m_startPos.setY(0); QWidget::mouseReleaseEvent(event); }
void TabWidget::paintEvent( QPaintEvent * pe ) { QPainter p( this ); p.setFont( pointSize<7>( font() ) ); // Draw background QBrush bg_color = p.background(); p.fillRect( 0, 0, width() - 1, height() - 1, bg_color ); // Draw external borders p.setPen( tabBorder() ); p.drawRect( 0, 0, width() - 1, height() - 1 ); // Draw tabs' bar background p.fillRect( 1, 1, width() - 2, m_tabheight + 2, tabBackground() ); // Draw title, if any if( ! m_caption.isEmpty() ) { p.setFont( pointSize<8>( p.font() ) ); p.setPen( tabTitleText() ); p.drawText( 5, 11, m_caption ); } // Calculate the tabs' x (tabs are painted next to the caption) int tab_x_offset = m_caption.isEmpty() ? 4 : 14 + fontMetrics().width( m_caption ); // Compute tabs' width depending on the number of tabs (only applicable for artwork tabs) widgetStack::iterator first = m_widgets.begin(); widgetStack::iterator last = m_widgets.end(); int tab_width = width(); if ( first != last ) { tab_width = ( width() - tab_x_offset ) / std::distance( first, last ); } // Draw all tabs p.setPen( tabText() ); for( widgetStack::iterator it = first ; it != last ; ++it ) { // Draw a text tab or a artwork tab. if( m_usePixmap ) { // Fixes tab's width, because original size is only correct for text tabs ( *it ).nwidth = tab_width; // Get artwork QPixmap artwork( embed::getIconPixmap( ( *it ).pixmap ) ); // Highlight active tab if( it.key() == m_activeTab ) { p.fillRect( tab_x_offset, 0, ( *it ).nwidth, m_tabbarHeight - 1, tabSelected() ); } // Draw artwork p.drawPixmap(tab_x_offset + ( ( *it ).nwidth - artwork.width() ) / 2, 1, artwork ); } else { // Highlight tab when active if( it.key() == m_activeTab ) { p.fillRect( tab_x_offset, 2, ( *it ).nwidth - 6, m_tabbarHeight - 4, tabSelected() ); } // Draw text p.drawText( tab_x_offset + 3, m_tabheight + 1, ( *it ).name ); } // Next tab's horizontal position tab_x_offset += ( *it ).nwidth; } }
Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid ) : QWidget( parent ), firstLineLabel(0), leftIndentLabel(0), rightIndentLabel(0), firstLineData(0), leftIndentData(0), rightIndentData(0) { docUnitRatio=unitGetRatioFromIndex(dEin); double ww = (wid < 0) ? 4000 : wid; tabrulerLayout = new QVBoxLayout( this ); tabrulerLayout->setMargin(0); tabrulerLayout->setSpacing(5); layout2 = new QHBoxLayout; layout2->setMargin(0); layout2->setSpacing(5); rulerScrollL = new QToolButton(this); rulerScrollL->setArrowType(Qt::LeftArrow); rulerScrollL->setAutoRepeat( true ); layout2->addWidget( rulerScrollL ); ruler = new RulerT( this, dEin, Tabs, haveFirst, wid ); ruler->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); layout2->addWidget( ruler ); rulerScrollR = new QToolButton(this); rulerScrollR->setArrowType(Qt::RightArrow); rulerScrollR->setAutoRepeat( true ); layout2->addWidget( rulerScrollR ); layout1 = new QHBoxLayout; layout1->setMargin(0); layout1->setSpacing(5); layout1->setAlignment( Qt::AlignTop ); typeCombo = new QComboBox(this); typeCombo->setEditable(false); typeCombo->clear(); typeCombo->addItem( tr( "Left" ) ); typeCombo->addItem( tr( "Right" ) ); typeCombo->addItem( tr( "Period" ) ); typeCombo->addItem( tr( "Comma" ) ); typeCombo->addItem( tr( "Center" ) ); layout1->addWidget( typeCombo ); tabData = new ScrSpinBox( 0, ww / docUnitRatio, this, dEin ); tabData->setValue(0); positionLabel = new QLabel( tr("&Position:"), this ); positionLabel->setBuddy(tabData); layout1->addWidget( positionLabel ); layout1->addWidget( tabData ); tabFillCombo = new QComboBox(this); tabFillCombo->setEditable(false); tabFillCombo->addItem( tr("None", "tab fill")); tabFillCombo->addItem( tr("Dot")); tabFillCombo->addItem( tr("Hyphen")); tabFillCombo->addItem( tr("Underscore")); tabFillCombo->addItem( tr("Custom")); tabFillComboT = new QLabel( tr( "Fill Char:" ), this ); tabFillComboT->setBuddy(tabFillCombo); layout1->addWidget( tabFillComboT ); layout1->addWidget( tabFillCombo ); layout4 = new QHBoxLayout; layout4->setMargin(0); layout4->setSpacing(5); indentLayout = new QHBoxLayout; indentLayout->setMargin(0); indentLayout->setSpacing(5); if (haveFirst) { firstLineData = new ScrSpinBox( -3000, ww / docUnitRatio, this, dEin); firstLineData->setValue(0); firstLineLabel = new QLabel(this); firstLineLabel->setText(""); firstLineLabel->setPixmap(IconManager::instance()->loadPixmap("firstline.png")); indentLayout->addWidget( firstLineLabel ); indentLayout->addWidget( firstLineData ); leftIndentData = new ScrSpinBox( 0, ww / docUnitRatio, this, dEin ); leftIndentData->setValue(0); leftIndentLabel = new QLabel(this); leftIndentLabel->setText(""); leftIndentLabel->setPixmap(IconManager::instance()->loadPixmap("leftindent.png")); layout4->addWidget( leftIndentLabel ); layout4->addWidget( leftIndentData ); layout4->addStretch(10); rightIndentLabel = new QLabel(this); rightIndentLabel->setText(""); rightIndentLabel->setPixmap(IconManager::instance()->loadPixmap("rightindent.png")); rightIndentData = new ScrSpinBox(0, ww / docUnitRatio, this, dEin); rightIndentData->setValue(0); indentLayout->addWidget(rightIndentLabel); indentLayout->addWidget(rightIndentData); } clearButton = new QPushButton( this ); clearButton->setText( tr( "Delete All" ) ); indentLayout->addSpacing(20); indentLayout->addWidget( clearButton); clearOneButton = new QPushButton( this ); clearOneButton->setText( tr( "Delete Selected" ) ); indentLayout->addWidget( clearOneButton); indentLayout->addStretch(10); if (!haveFirst) { QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout1->addItem( spacer ); } layout1->addStretch( 10 ); tabrulerLayout->addLayout( layout1 ); tabrulerLayout->addLayout( layout2 ); indentLayout->addStretch( 10 ); tabrulerLayout->addLayout( indentLayout ); tabrulerLayout->addLayout(layout4); tabData->setEnabled(false); tabFillCombo->setEnabled(false); typeCombo->setEnabled(false); if (Tabs.count() == 0) clearButton->setEnabled(false); clearOneButton->setEnabled(false); resize( minimumSizeHint() ); connect(rulerScrollL, SIGNAL(clicked()), ruler, SLOT(decreaseOffset())); connect(rulerScrollR, SIGNAL(clicked()), ruler, SLOT(increaseOffset())); connect(rulerScrollL, SIGNAL(released()), this, SLOT(resetOFfL())); connect(rulerScrollR, SIGNAL(released()), this, SLOT(resetOFfR())); connect(ruler, SIGNAL(typeChanged(int)) , this, SLOT(setTabType(int))); connect(ruler, SIGNAL(fillCharChanged(QChar)) , this, SLOT(setTabFillChar(QChar))); connect(typeCombo, SIGNAL(activated(int)), this, SLOT(setType())); connect(tabFillCombo, SIGNAL(activated(int)), this, SLOT(setFillChar())); connect(tabFillCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(setCustomFillChar(const QString &))); connect(ruler, SIGNAL(tabMoved(double)) , this, SLOT(setTabData(double))); connect(ruler, SIGNAL(tabSelected()), this, SLOT(tabAdded())); connect(ruler, SIGNAL(newTab()), this, SLOT(tabAdded())); connect(ruler, SIGNAL(noTabs()), this, SLOT(lastTabRemoved())); connect(tabData, SIGNAL(valueChanged(double)), this, SLOT(setTab())); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearAll())); connect(clearOneButton, SIGNAL(clicked()), this, SLOT(clearOne())); tabFillCombo->setToolTip( tr( "Fill Character of Tab" ) ); typeCombo->setToolTip( tr( "Type/Orientation of Tab" ) ); tabData->setToolTip( tr( "Position of Tab" ) ); if (haveFirst) { connect(ruler, SIGNAL(firstLineMoved(double)) , this, SLOT(setFirstLineData(double))); connect(ruler, SIGNAL(leftIndentMoved(double)) , this, SLOT(setLeftIndentData(double))); connect(ruler, SIGNAL(mouseReleased()), this, SIGNAL(tabrulerChanged())); connect(ruler, SIGNAL(mouseReleased()), this, SLOT(slotMouseReleased())); connect(firstLineData, SIGNAL(valueChanged(double)), this, SLOT(setFirstLine())); connect(leftIndentData, SIGNAL(valueChanged(double)), this, SLOT(setLeftIndent())); connect(rightIndentData, SIGNAL(valueChanged(double)), this, SLOT(setRightIndent())); firstLineData->setToolTip( tr( "Indentation for first line of the paragraph" ) ); leftIndentData->setToolTip( tr( "Indentation from the left for the whole paragraph" ) ); rightIndentData->setToolTip( tr( "Indentation from the right for the whole paragraph" ) ); firstLineLabel->setToolTip(firstLineData->toolTip()); leftIndentLabel->setToolTip(leftIndentData->toolTip()); rightIndentLabel->setToolTip(rightIndentData->toolTip()); } clearButton->setToolTip( tr( "Delete all Tabulators" ) ); clearOneButton->setToolTip( tr("Delete selected Tabulator")); QString ein = unitGetSuffixFromIndex(dEin); if (dEin == 2) { if (haveFirst) { firstLineData->setDecimals(4); leftIndentData->setDecimals(4); rightIndentData->setDecimals(4); } tabData->setDecimals(4); } if (haveFirst) { firstLineData->setSuffix(ein); leftIndentData->setSuffix(ein); rightIndentData->setSuffix(ein); } tabData->setSuffix(ein); haveF = haveFirst; }