Exemplo n.º 1
0
BuddiesListView::BuddiesListView(QWidget *parent) :
		QTreeView(parent), Delegate(0), Model(0),
		ProxyModel(new BuddiesModelProxy(this)), BackgroundTemporaryFile(0),
		ContextMenuEnabled(false)
{
	setAnimated(BackgroundImageMode == BackgroundNone);
#ifndef Q_WS_MAEMO_5
	/* Disable as we use kinetic scrolling by default */
	setDragEnabled(true);
#endif
	setExpandsOnDoubleClick(false);
	setHeaderHidden(true);
	setItemsExpandable(true);
	setMouseTracking(true);
	setRootIsDecorated(true);
	setSelectionMode(QAbstractItemView::ExtendedSelection);
#ifndef Q_WS_MAEMO_5
	setUniformRowHeights(false);
#endif
	setWordWrap(true);

	Delegate = new BuddiesListViewDelegate(this);
	setItemDelegate(Delegate);

	HideUnloadedFilter = new ContactNoUnloadedAccountFilter(this);

	ToolTipTimeoutTimer.setSingleShot(true);

	connect(MainConfiguration::instance(), SIGNAL(simpleModeChanged()), this, SLOT(simpleModeChanged()));
	connect(&ToolTipTimeoutTimer, SIGNAL(timeout()), this, SLOT(toolTipTimeout()));
	connect(this, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(doubleClickedSlot(const QModelIndex &)));
	connect(PendingMessagesManager::instance(), SIGNAL(messageAdded(Message)), this, SLOT(update()));
	connect(PendingMessagesManager::instance(), SIGNAL(messageRemoved(Message)), this, SLOT(update()));

	simpleModeChanged();
}
Exemplo n.º 2
0
void SimpleSettings::loadSettings(HaarSettings& newSettings)
{
    d->settings = newSettings;
    d->settingsSlider->setValue(d->settings.simpleMode);
    simpleModeChanged(d->settings.simpleMode);
}