bool AudioProcessor::Bus::enable (bool shouldEnable) { if (isEnabled() == shouldEnable) return true; return setCurrentLayout (shouldEnable ? lastLayout : AudioChannelSet::disabled()); }
void KeyboardApplet::drawCurrentLayout(QString layout) { if(layout.isEmpty()) { layout = Keyboard::getCurrentLayout(); } if(layout.isEmpty() || (m_current_layout != layout)) { // Set layout to current layout setCurrentLayout(m_current_layout); } if(!layout.isEmpty()) { qDebug() << layout; QImage img(30, 16, QImage::Format_RGB888); QPainter p(&img); p.fillRect(0,0,30,16, Qt::white); p.setPen(QPen(Qt::black)); p.drawText(img.rect(), Qt::AlignCenter, layout); m_textItem->setImage(img); } }
bool KeyboardApplet::init() { setInteractive(true); setCurrentLayout(m_current_layout); return true; }
QgsLayoutItemComboBox::QgsLayoutItemComboBox( QWidget *parent, QgsLayout *layout ) : QComboBox( parent ) { setCurrentLayout( layout ); setModelColumn( QgsLayoutModel::ItemId ); connect( this, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutItemComboBox::indexChanged ); }
EmoticonSelectorPage::EmoticonSelectorPage(EmoticonSelector* parent, QStringList set, bool isFav) : QWidget(parent), m_set(set), m_isFav(isFav) { m_parentSelector = parent; setCurrentLayout(); setFixedSize(sizeHint()); }
void EmoticonSelectorPage::setupFavouriteEmoticons() { FavouriteEmoticonsDialog dlg; connect (&dlg, SIGNAL(doubleClicked(QString)), m_parentSelector, SLOT(slotClicked(QString))); if (dlg.exec() == QDialog::Accepted) { delete this->layout(); delete emotions; setCurrentLayout(); correctSize(); } }
void KeyboardApplet::changeBackword() { if(m_supported_layouts.count() < 2) return; int pos = m_supported_layouts.indexOf(m_current_layout); if(pos <= 0) { m_current_layout = m_supported_layouts.at(m_supported_layouts.count() -1); } else { m_current_layout = m_supported_layouts.at(pos-1); } setCurrentLayout(m_current_layout); }
void KeyboardApplet::changeForward() { if(m_supported_layouts.count() < 2) return; int pos = m_supported_layouts.indexOf(m_current_layout); if(pos >= (m_supported_layouts.count() - 1)) { m_current_layout = m_supported_layouts.at(0); } else { m_current_layout = m_supported_layouts.at(pos+1); } setCurrentLayout(m_current_layout); }
bool AudioProcessor::Bus::setCurrentLayoutWithoutEnabling (const AudioChannelSet& set) { if (! set.isDisabled()) { if (isEnabled()) return setCurrentLayout (set); if (isLayoutSupported (set)) { lastLayout = set; return true; } return false; } return isLayoutSupported (set); }
QS60StylePrivate::QS60StylePrivate() { setCurrentLayout(0); }