Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

LauncherView Class Reference
[QtBaseModule]

The LauncherView class provides the base for any type of laucnher view used by Qtopia. More...

    #include <LauncherView>

Inherits QWidget.

Inherited by ApplicationLauncherView, ArchiveViewer, ContentSetLauncherView, DocumentLauncherView, and TaskManagerLauncherView.

Public Functions

  • 206 public functions inherited from QWidget
  • 29 public functions inherited from QObject
  • 14 public functions inherited from QPaintDevice

Public Slots

  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject

Signals

Static Public Members

  • 4 static public members inherited from QWidget
  • 4 static public members inherited from QObject

Protected Functions

  • 38 protected functions inherited from QWidget
  • 7 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice

Protected Slots

  • virtual void currentChanged ( const QModelIndex & current, const QModelIndex & previous )
  • 1 protected slot inherited from QWidget

Additional Inherited Members


Detailed Description

The LauncherView class provides the base for any type of laucnher view used by Qtopia.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.

See also ApplicationLauncherView and DocumentLauncherView.


Member Function Documentation

LauncherView::LauncherView ( QWidget * parent = 0, Qt::WFlags flags = 0 )

Create a LauncherView instance with the given parent and flags.

LauncherView::~LauncherView ()   [virtual]

Destroys the LauncherView.

void LauncherView::addItem ( QContent * app, bool resort = true )

Adds app to the view. resort is ignored at this stage.

See also removeItem().

void LauncherView::clearSelection ()

Clears the current selection.

void LauncherView::clicked ( QContent content )   [signal]

This signal is emitted whenever the user clickes on an item. The activated item is passed as content object.

LauncherView * LauncherView::createLauncherView ( const QByteArray & name, QWidget * parent = 0, Qt::WFlags flags = 0 )   [static]

Returns a new launcher view instance with the given parent and flags. name is the name of the LauncherView subclass to be created.

New launcher view subclasses can be registered via the UIFactory class and UIFACTORY_REGISTER_WIDGET().

    //customlauncherview.cpp
    #include "uifactory.h"
    #include "launcherview.h"

    class CustomLauncherView : public LauncherView {

    };

    UIFACTORY_REGISTER_WIDGET(CustomLauncherView);

    //code.cpp
    LauncherView *view = LauncherView::createLauncherView( "CustomLauncherView", parent, flags );

Launcher view instances should be created via this factory method whenever the caller doesn't intend to actually include the declaration for CustomLauncherView.

This function returns a null pointer if name doesn't exist.

void LauncherView::currentChanged ( const QModelIndex & current, const QModelIndex & previous )   [virtual protected slot]

This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.

QModelIndex LauncherView::currentIndex () const

Returns the index of the currently selected item.

const QContent LauncherView::currentItem () const

Returns the currently selected item.

QListView::Flow LauncherView::flow () const

Returns the direction the items layout should flows.

See also setFlow() and QListView::flow().

void LauncherView::handleItemClicked ( const QModelIndex & item, bool setCurrentIndex )   [virtual protected]

This event handler can be reimplemented in a subclass to react when a mouse button is clicked with the specified item. item will be selected if setCurrentIndex is true.

void LauncherView::handleItemPressed ( const QModelIndex & item )   [virtual protected]

This event handler can be reimplemented in a subclass to react when a mouse button is pressed with the specified item.

void LauncherView::handleReturnPressed ( const QModelIndex & item )   [virtual protected]

This event handler can be reimplemented in a subclass to react to Enter or Return key press on the current item. The default implementation emits the clicked() signal.

QSize LauncherView::listIconSize ( QWidget * widget )   [static]

Returns the size of icons the given widget should use if it is a launcher view in list mode. This can be used to make other list views look consistent with launcher views.

QContentSetModel * LauncherView::model () const

Returns the content model that the view is presenting.

See also setModel().

void LauncherView::removeAllItems ()

Removes all items from the view

void LauncherView::removeItem ( const QContent & app )

Removes app from the view.

See also addItem().

void LauncherView::resetSelection ()   [virtual]

This function can be reimplemented by subclasses to adjust the way how the view is reset. The default implementation selects the first item in the view.

void LauncherView::rightPressed ( QContent content )   [signal]

This signal is emitted when the user clciks on content with the right mouse button. This signal may be used in conjunction with a context menu.

void LauncherView::setAuxiliaryFilter ( const QContentFilter & filter )   [slot]

filter acts as an auxiliary filter besides the main filter.

void LauncherView::setBusy ( bool on )

Sets the busy state of the currently selected item to on. This indicates to the user that the current selection is processed.

void LauncherView::setColumns ( int columns )

Sets the number of columns. This value defaults to 1.

void LauncherView::setFilter ( const QContentFilter & filter )   [virtual]

The view will be adjusted according to filter.

void LauncherView::setFlow ( QListView::Flow flow )

Sets the direction the items layout should flow.

This property only affects the Icon view mode.

See also flow() and QListView::setFlow().

void LauncherView::setItemDelegate ( QAbstractItemDelegate * delegate )

Sets the item delegate for the contained view and its model to delegate. The old delegate is deleted in the process.

See also QAbstractItemView::setItemDelegate().

void LauncherView::setModel ( QContentSetModel * model )

Sets a new model for this view. Any existing model will be deleted.

See also model().

void LauncherView::setViewMode ( QListView::ViewMode m )

Sets the viewmode of the contained item view to m.

See also viewMode() and QListView::setViewMode().

void LauncherView::showCategory ( const QContentFilter & filter )   [slot]

Only items that are of category filter will be shown.

void LauncherView::showType ( const QContentFilter & filter )   [slot]

filter is applied in addition to the main filter.

See also setFilter().

QListView::ViewMode LauncherView::viewMode () const

Returns the used view mode.

See also setViewMode() and QListView::viewMode().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 85
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 19
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le Qt Quarterly au hasard

Logo

Requête de données génériques avec QtXmlPatterns et XQuery

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web