Ejemplo n.º 1
0
bool KSaneOptEntry::setValue(const QString &val)
{
    if (state() == STATE_HIDDEN) return false;
    entryChanged(val);
    readValue();
    return true;
}
Ejemplo n.º 2
0
PlaylistModel::PlaylistModel (QObject *parent, XClient *client, const QString &name) : QAbstractItemModel (parent), m_current_pos (0)
{
//	m_columns.append ("#");
	m_columns.append ("Artist");
	m_columns.append ("Title");
	m_columns.append ("Duration");

//	m_colfallback.append ("");
	m_colfallback.append ("");
	m_colfallback.append ("url");
	m_colfallback.append ("");

	m_cached_size.append (QSize ());
	m_cached_size.append (QSize ());
	m_cached_size.append (QSize ());

	connect (client, SIGNAL(gotConnection (XClient *)), this, SLOT (got_connection (XClient *))); 
	connect (client->cache (), SIGNAL(entryChanged (uint32_t)), this, SLOT (entry_changed (uint32_t)));

	m_isactive = (name == QLatin1String ("_active"));

	m_name = name;

	if (client->isConnected ()) {
		got_connection (client);
	}
}
Ejemplo n.º 3
0
void eListbox::setSelectionEnable(int en)
{
	if (m_selection_enabled == en)
		return;
	m_selection_enabled = en;
	entryChanged(m_selected); /* redraw current entry */
}
Ejemplo n.º 4
0
void Wikipedia::setEntry(const QString &nEntry)
{
    if (nEntry != m_entry) {
        m_entry = nEntry;
#ifdef QT_DEBUG
        qDebug() << "Changed entry to" << m_entry;
#endif
        emit entryChanged(entry());
        getTranslation();
    }
}
Ejemplo n.º 5
0
CollectionModel::CollectionModel (QObject *parent, XClient *client) : QAbstractItemModel (parent)
{
	connect (client, SIGNAL (gotConnection (XClient *)), this, SLOT (got_connection (XClient *)));
	connect (client->cache (), SIGNAL(entryChanged (uint32_t)), this, SLOT (entry_changed (uint32_t)));

	m_client = client;

	m_columns.append ("Artist");
	m_columns.append ("Album");
	m_columns.append ("Title");

	m_cached_size.append (QSize ());
	m_cached_size.append (QSize ());
	m_cached_size.append (QSize ());
}
Ejemplo n.º 6
0
bool
XClientCache::handle_medialib_info (const Xmms::PropDict &info)
{
	uint32_t id = info.get<int32_t> ("id");
	QHash<QString, QVariant> hash = XClient::convert_propdict (info);

	m_info.insert (id, hash);
	emit entryChanged (id);

	if (id == m_current_id) {
		emit activeEntryChanged (hash);
	}

	return true;
}
Ejemplo n.º 7
0
EntryInfo::EntryInfo (QWidget *parent, XClientCache *cache, uint32_t id)
                      : QDialog (parent)
{
	setupUi (this);
	setAttribute (Qt::WA_DeleteOnClose);

	m_cache = cache;
	m_id = id;

	connect (cache, SIGNAL (entryChanged (uint32_t)),
	         this, SLOT (mlib_entry_changed (uint32_t)));

	connect (cache, SIGNAL (entryRemoved (uint32_t)),
	         this, SLOT (mlib_entry_removed (uint32_t)));

	getInfo ();
}
Ejemplo n.º 8
0
void ChooseLexicalEntriesDialog::setupLayout()
{
    QVBoxLayout *layout = new QVBoxLayout;
    setLayout(layout);

    for(int i=0; i<mAllomorphStrings.count(); i++)
    {
        LexicalEntryForm *form = new LexicalEntryForm( mAllomorphStrings.at(i), mGlossItem, mProject, this );
        connect(form, SIGNAL(entryChanged()), this, SLOT(setAcceptable()) );

        layout->addWidget(form);
        mEntries << form;
    }

    mOk = new QPushButton("OK", this);
    QPushButton * cancel = new QPushButton("Cancel", this);
    QPushButton * resegment = new QPushButton("Resegment", this);

    QHBoxLayout *buttons = new QHBoxLayout;
    buttons->addStretch(1);
    buttons->addWidget(mOk);
    buttons->addWidget(cancel);
    buttons->addWidget(resegment);

    connect( mOk, SIGNAL(clicked()), this, SLOT(accept()) );
    connect( cancel, SIGNAL(clicked()), this, SLOT(reject()));
    connect( resegment, SIGNAL(clicked()), this, SLOT(reject()));
    connect( resegment, SIGNAL(clicked()), this, SIGNAL(resegment()) );


    layout->addLayout(buttons);

    mOk->setDefault(true);

    setAcceptable();
}
Ejemplo n.º 9
0
bool
XClientCache::handle_bindata (const Xmms::bin &data, const QString &id)
{
	QPixmap i;
	i.loadFromData (data.c_str (), data.size());

	if (i.isNull ()) {
		return true;
	}

	/* conserve memory client side */
	if (i.width () < 300) {
		i = i.scaledToWidth (300, Qt::SmoothTransformation);
	}

	QPixmapCache::insert (id, i);

	QList<uint32_t> ids = m_icon_map[id];
	for (int i = 0; i < ids.size (); i++) {
		emit entryChanged (ids.at (i));
	}

	return true;
}
Ejemplo n.º 10
0
void CustomStimEditor::onEntryChanged()
{
	if (_updatesDisabled) return; // Callback loop guard

	entryChanged(_propertyWidgets.nameEntry);
}
Ejemplo n.º 11
0
void ClassEditor::onEntryChanged(Gtk::Entry* entry)
{
	if (_updatesDisabled) return; // Callback loop guard

	entryChanged(entry);
}