void RenderThemeGtk::refreshComboBoxChildren() const { gtkComboBox(); // Ensure that we've initialized the combo box. // Some themes look at widget ancestry to determine how to render widgets, so // get the GtkButton that is the actual child of the combo box. gtk_container_forall(GTK_CONTAINER(m_gtkComboBox), getGtkComboBoxButton, &m_gtkComboBoxButton); ASSERT(m_gtkComboBoxButton); setupWidget(m_gtkComboBoxButton); g_object_add_weak_pointer(G_OBJECT(m_gtkComboBoxButton), reinterpret_cast<gpointer*>(&m_gtkComboBoxButton)); ComboBoxWidgetPieces pieces = { 0, 0 }; GtkWidget* buttonChild = gtk_bin_get_child(GTK_BIN(gtkComboBoxButton())); if (GTK_IS_HBOX(buttonChild)) gtk_container_forall(GTK_CONTAINER(buttonChild), getGtkComboBoxPieces, &pieces); else if (GTK_IS_ARROW(buttonChild)) pieces.arrow = buttonChild; ASSERT(pieces.arrow); m_gtkComboBoxArrow = pieces.arrow; setupWidget(m_gtkComboBoxArrow); // When the style changes, the combo box may destroy its children. g_object_add_weak_pointer(G_OBJECT(m_gtkComboBoxArrow), reinterpret_cast<gpointer*>(&m_gtkComboBoxArrow)); m_gtkComboBoxSeparator = pieces.separator; if (m_gtkComboBoxSeparator) { setupWidget(m_gtkComboBoxSeparator); // When the style changes, the combo box may destroy its children. g_object_add_weak_pointer(G_OBJECT(m_gtkComboBoxSeparator), reinterpret_cast<gpointer*>(&m_gtkComboBoxSeparator)); } }
LEDSendDialog::LEDSendDialog(ChildWindowBase *parent): ChildWindowBase(parent), ui(new Ui::LEDSendDialog) { ui->setupUi(this); setupWidget(); setupSignals(); }
void RenderThemeGtk::setupWidgetAndAddToContainer(GtkWidget* widget, GtkWidget* window) const { gtk_container_add(GTK_CONTAINER(window), widget); setupWidget(widget); // FIXME: Perhaps this should only be called for the containing window or parent container. g_signal_connect(widget, "style-set", G_CALLBACK(gtkStyleSetCallback), const_cast<RenderThemeGtk*>(this)); }
TimingSwitchDialog::TimingSwitchDialog(ChildWindowBase *parent) : ChildWindowBase(parent), ui(new Ui::TimingSwitchDialog) { ui->setupUi(this); setupWidget(); setupSignal(); }
ResourceTableWidget::ResourceTableWidget(QWidget *parent) : QWidget(parent) , m_documentView(0) , m_searchResultModel(0) { setupWidget(); setMouseTracking(true); }
RealtimeArrangeDialog::RealtimeArrangeDialog(QWidget* parent /* = NULL */): QDialog(parent) { setupUi(this); setupWidget(); setupSignals(); setDevicesNames(); setInputPinNames(); }
PropertyCollectionWidget::PropertyCollectionWidget(QWidget* parent /*= 0*/) : QWidget(parent) , _propCollection(nullptr) , _dataContainer(nullptr) , _layout(nullptr) , _strechWidget(nullptr) { setupWidget(); }
CameraView::CameraView(boost::shared_ptr<SingleClient>client, QWidget *parent): QGroupBox(parent), m_Client(client), m_Socket(INVALID_SOCKET), m_IsStart(false), m_IsFirst(true), m_ShowCtrl(false) { setupWidget(); }
GtkWidget* RenderThemeGtk::gtkContainer() const { if (m_gtkContainer) return m_gtkContainer; m_gtkWindow = gtk_window_new(GTK_WINDOW_POPUP); gtk_widget_set_colormap(m_gtkWindow, m_colormap); setupWidget(m_gtkWindow); gtk_widget_set_name(m_gtkWindow, "MozillaGtkWidget"); m_gtkContainer = gtk_fixed_new(); setupWidgetAndAddToContainer(m_gtkContainer, m_gtkWindow); return m_gtkContainer; }
/*! Sets the widget \a widget on this item. */ void QThemeWidgetItem::setWidget(QWidget* widget) { d->widget = widget; setupWidget(); }
/*! \reimp */ void QThemeWidgetItem::constructionComplete() { d->completed = true; setupWidget(); QThemeItem::constructionComplete(); }
CollapsibleEffect::CollapsibleEffect(const QDomElement &effect, const QDomElement &original_effect, const ItemInfo &info, EffectMetaInfo *metaInfo, bool canMoveUp, bool lastEffect, QWidget * parent) : AbstractCollapsibleWidget(parent), m_paramWidget(NULL), m_effect(effect), m_itemInfo(info), m_original_effect(original_effect), m_isMovable(true), m_animation(NULL), m_regionEffect(false) { if (m_effect.attribute(QStringLiteral("tag")) == QLatin1String("region")) { m_regionEffect = true; decoframe->setObjectName(QStringLiteral("decoframegroup")); } filterWheelEvent = true; m_info.fromString(effect.attribute(QStringLiteral("kdenlive_info"))); //setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)); buttonUp->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-up"))); buttonUp->setToolTip(i18n("Move effect up")); buttonDown->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-down"))); buttonDown->setToolTip(i18n("Move effect down")); buttonDel->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-deleffect"))); buttonDel->setToolTip(i18n("Delete effect")); buttonUp->setEnabled(canMoveUp); buttonDown->setEnabled(!lastEffect); if (m_effect.attribute(QStringLiteral("id")) == QLatin1String("speed")) { // Speed effect is a "pseudo" effect, cannot be moved buttonUp->setVisible(false); buttonDown->setVisible(false); m_isMovable = false; setAcceptDrops(false); } else { setAcceptDrops(true); } /*buttonReset->setIcon(KoIconUtils::themedIcon("view-refresh")); buttonReset->setToolTip(i18n("Reset effect"));*/ //checkAll->setToolTip(i18n("Enable/Disable all effects")); //buttonShowComments->setIcon(KoIconUtils::themedIcon("help-about")); //buttonShowComments->setToolTip(i18n("Show additional information for the parameters")); m_menu = new QMenu(this); m_menu->addAction(KoIconUtils::themedIcon(QStringLiteral("view-refresh")), i18n("Reset Effect"), this, SLOT(slotResetEffect())); m_menu->addAction(KoIconUtils::themedIcon(QStringLiteral("document-save")), i18n("Save Effect"), this, SLOT(slotSaveEffect())); QHBoxLayout *l = static_cast <QHBoxLayout *>(frame->layout()); m_colorIcon = new QLabel(this); l->insertWidget(0, m_colorIcon); title = new QLabel(this); l->insertWidget(2, title); m_enabledButton = new KDualAction(i18n("Disable Effect"), i18n("Enable Effect"), this); m_enabledButton->setActiveIcon(KoIconUtils::themedIcon(QStringLiteral("hint"))); m_enabledButton->setInactiveIcon(KoIconUtils::themedIcon(QStringLiteral("visibility"))); enabledButton->setDefaultAction(m_enabledButton); m_groupAction = new QAction(KoIconUtils::themedIcon(QStringLiteral("folder-new")), i18n("Create Group"), this); connect(m_groupAction, SIGNAL(triggered(bool)), this, SLOT(slotCreateGroup())); QDomElement namenode = m_effect.firstChildElement(QStringLiteral("name")); if (namenode.isNull()) { // Warning, broken effect? //qDebug()<<"// Could not create effect"; return; } QString effectname = i18n(namenode.text().toUtf8().data()); if (m_regionEffect) effectname.append(':' + QUrl(EffectsList::parameter(m_effect, QStringLiteral("resource"))).fileName()); // Create color thumb QPixmap pix(menuButton->height(), menuButton->height()); QColor col(m_effect.attribute(QStringLiteral("effectcolor"))); QFont ft = font(); ft.setBold(true); bool isAudio = m_effect.attribute(QStringLiteral("type")) == QLatin1String("audio"); if (isAudio) { pix.fill(Qt::transparent); } else { pix.fill(col); } QPainter p(&pix); if (isAudio) { p.setPen(Qt::NoPen); p.setBrush(col); p.drawEllipse(pix.rect()); p.setPen(QPen()); } p.setFont(ft); p.drawText(pix.rect(), Qt::AlignCenter, effectname.at(0)); p.end(); m_iconPix = pix; m_colorIcon->setPixmap(pix); title->setText(effectname); if (!m_regionEffect) { if (m_info.groupIndex == -1) m_menu->addAction(m_groupAction); m_menu->addAction(KoIconUtils::themedIcon(QStringLiteral("folder-new")), i18n("Create Region"), this, SLOT(slotCreateRegion())); } setupWidget(info, metaInfo); menuButton->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-menu"))); menuButton->setMenu(m_menu); if (m_effect.attribute(QStringLiteral("disable")) == QLatin1String("1")) { title->setEnabled(false); m_enabledButton->setActive(true); } else { m_enabledButton->setActive(false); } connect(collapseButton, SIGNAL(clicked()), this, SLOT(slotSwitch())); connect(m_enabledButton, SIGNAL(activeChangedByUser(bool)), this, SLOT(slotDisable(bool))); connect(buttonUp, SIGNAL(clicked()), this, SLOT(slotEffectUp())); connect(buttonDown, SIGNAL(clicked()), this, SLOT(slotEffectDown())); connect(buttonDel, SIGNAL(clicked()), this, SLOT(slotDeleteEffect())); Q_FOREACH( QSpinBox * sp, findChildren<QSpinBox*>() ) { sp->installEventFilter( this ); sp->setFocusPolicy( Qt::StrongFocus ); }
GroupClientsDialog::GroupClientsDialog() { setupWidget(); }
PipelineTreeWidget::PipelineTreeWidget(QWidget* parent /*= 0*/) : QTreeView(parent) { setupWidget(); }
QCustomTabBarLineEdit::QCustomTabBarLineEdit(const QString &contents, QWidget *parent) : QLineEdit(contents, parent) { setupWidget(); }
QCustomTabBarLineEdit::QCustomTabBarLineEdit(QWidget *parent) : QLineEdit(parent) { setupWidget(); }