Qt 4.8
Classes | Functions
qinputdialog.cpp File Reference
#include "qinputdialog.h"
#include "qapplication.h"
#include "qcombobox.h"
#include "qdialogbuttonbox.h"
#include "qlabel.h"
#include "qlayout.h"
#include "qlineedit.h"
#include "qlistwidget.h"
#include "qpushbutton.h"
#include "qspinbox.h"
#include "qstackedlayout.h"
#include "qvalidator.h"
#include "qevent.h"
#include "qdialog_p.h"
#include "qinputdialog.moc"
#include "moc_qinputdialog.cpp"

Go to the source code of this file.

Classes

class  QInputDialogDoubleSpinBox
 
class  QInputDialogPrivate
 
class  QInputDialogSpinBox
 

Functions

static const char * signalForMember (const char *member)
 

Function Documentation

◆ signalForMember()

static const char* signalForMember ( const char *  member)
static

Definition at line 62 of file qinputdialog.cpp.

Referenced by QInputDialog::done(), and QInputDialog::open().

63 {
64  static const int NumCandidates = 4;
65  static const char * const candidateSignals[NumCandidates] = {
66  SIGNAL(textValueSelected(QString)),
67  SIGNAL(intValueSelected(int)),
68  SIGNAL(doubleValueSelected(double)),
69  SIGNAL(accepted())
70  };
71 
72  QByteArray normalizedMember(QMetaObject::normalizedSignature(member));
73 
74  int i = 0;
75  while (i < NumCandidates - 1) { // sic
76  if (QMetaObject::checkConnectArgs(candidateSignals[i], normalizedMember))
77  break;
78  ++i;
79  }
80  return candidateSignals[i];
81 }
static QByteArray normalizedSignature(const char *method)
Normalizes the signature of the given method.
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool checkConnectArgs(const char *signal, const char *method)
Returns true if the signal and method arguments are compatible; otherwise returns false...