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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Fonctions  · 

QMotifDialog Class Reference

The QMotifDialog class provides the QDialog API for Motif-based dialogs. More...

This class is part of the Qt Motif Extension.

#include <qmotifdialog.h>

Inherits QDialog.

List of all member functions.

Public Members

  • enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working }  (obsolete)
  • QMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )  (obsolete)
  • QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )  (obsolete)
  • QMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
  • QMotifDialog ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
  • virtual ~QMotifDialog ()
  • Widget shell () const
  • Widget dialog () const

Static Public Members


Detailed Description

This class is defined in the Qt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main Qt API.

The QMotifDialog class provides the QDialog API for Motif-based dialogs.

QMotifDialog provides two separate modes of operation. The application programmer can use QMotifDialog with an existing Motif-based dialog and a QWidget parent, or the application programmer can use QMotifDialog with a custom Qt-based dialog and a Motif-based parent. Modality continues to work as expected.

Motif-based dialogs must have a Shell widget parent with a single child, due to requirements of the Motif toolkit. The Shell widget, which is a special subclass of XmDialogShell, is created during construction. It can be accessed using the shell() member function.

The single child of the Shell can be accessed using the dialog() member function after it has been created.

The acceptCallback() and rejectCallback() functions provide a convenient way to call QDialog::accept() and QDialog::reject() through callbacks. A pointer to the QMotifDialog should be passed as the client_data argument to the callback.

The API and behavior QMotifDialog is identical to that of QDialog when using a custom Qt-based dialog with a Motif-based parent. The only difference is that a Motif-based parent argument is passed to the constructor, instead of a QWidget parent.


Member Type Documentation

QMotifDialog::DialogType

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

This enum lists the predefined Motif dialog types.

  • QMotifDialog::Prompt
  • QMotifDialog::Selection
  • QMotifDialog::Command
  • QMotifDialog::FileSelection
  • QMotifDialog::Template
  • QMotifDialog::Error
  • QMotifDialog::Information
  • QMotifDialog::Message
  • QMotifDialog::Question
  • QMotifDialog::Warning
  • QMotifDialog::Working

Member Function Documentation

QMotifDialog::QMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

Creates a QMotifDialog using one of the predefined Motif dialog types. The name, modal and flags arguments are passed to the QDialog constructor.

This constructor creates a Shell widget, which is a special subclass of XmDialogShell. The parent, args and argcount arguments are passed to XtCreatePopupShell() when creating the subclass. You can access the Shell widget with the shell() member function.

This constructor also creates the dialog widget with the Shell widget as its parent. The type of the dialog created is specified by the dialogtype argument. See the DialogType enum for a list of available dialog types. You can access the dialog widget with the dialog() member function.

Warning: QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.

See also DialogType, shell(), and dialog().

QMotifDialog::QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

Creates a QMotifDialog which allows the application programmer to use the Motif-based parent for a custom QDialog. The name, modal and flags arguments are passed to the QDialog constructor.

This constructor creates a Shell widget, which is a special subclass of XmDialogShell. The args and argcount arguments are passed to XtCreatePopupShell() when creating the subclass. You can access the Shell widget with the shell() member function.

The dialog widget is not created by the constructor. You must create the dialog widget as a child of the the widget returned by shell(). You can access the child widget with the dialog() member function.

A dialog widget is not created by this constructor. Instead, you should create the dialog widget as a child of this dialog. QMotifDialog will take ownership of your custom dialog, and you can access it with the dialog() member function.

Warning: QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.

See also shell() and dialog().

QMotifDialog::QMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )

Creates a QMotifDialog which allows the application programmer to use the Motif-based parent for a custom QDialog. The name, modal and flags arguments are passed to the QDialog constructor.

This constructor creates a Shell widget, which is a special subclass of XmDialogShell. You can access the Shell widget with the shell() member function.

See also shell().

QMotifDialog::QMotifDialog ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )

Creates a QMotifDialog which allows the application programmer to use a QWidget parent for an existing Motif-based dialog. The parent, name, modal and flags arguments are passed to the QDialog constructor.

This constructor creates a Shell widget, which is a special subclass of XmDialogShell. You can access the Shell widget with the shell() member functon.

A dialog widget is not created by this constructor. Instead, you should create the dialog widget as a child of this dialog. QMotifDialog will take ownership of your custom dialog, and you can access it with the dialog() member function.

Warning: QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.

See also shell() and dialog().

QMotifDialog::~QMotifDialog () [virtual]

Destroys the QDialog, dialog widget and Shell widget.

void QMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer ) [static]

Convenient Xt/Motif callback to accept the QMotifDialog.

The data is passed in client_data.

Widget QMotifDialog::dialog () const

Returns the Motif widget embedded in this dialog.

void QMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer ) [static]

Convenient Xt/Motif callback to reject the QMotifDialog.

The data is passed in client_data.

Widget QMotifDialog::shell () const

Returns the Shell widget embedded in this dialog.

Example: dialog/mainwindow.cpp.


This file is part of the Qt toolkit. Copyright © 1995-2005 Trolltech. All Rights Reserved.

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 94
  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. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 41
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Labs au hasard

Logo

Améliorer les performances de Qt lors du rendu avec plus de SIMD

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. 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 3.3
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