本文整理汇总了C++中QXT_INIT_PRIVATE函数的典型用法代码示例。如果您正苦于以下问题:C++ QXT_INIT_PRIVATE函数的具体用法?C++ QXT_INIT_PRIVATE怎么用?C++ QXT_INIT_PRIVATE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了QXT_INIT_PRIVATE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QMessageBox
/*!
Constructs a new QxtConfirmationMessage with \a icon, \a title, \a text, \a confirmation, \a buttons, \a parent and \a flags.
*/
QxtConfirmationMessage::QxtConfirmationMessage(QMessageBox::Icon icon, const QString& title, const QString& text, const QString& confirmation,
QMessageBox::StandardButtons buttons, QWidget* parent, Qt::WindowFlags flags)
: QMessageBox(icon, title, text, buttons, parent, flags)
{
QXT_INIT_PRIVATE(QxtConfirmationMessage);
qxt_d().init(confirmation);
}
示例2: QAbstractScrollArea
QxtScheduleView::QxtScheduleView(QWidget *parent)
: QAbstractScrollArea(parent)
{
QXT_INIT_PRIVATE(QxtScheduleView);
/*standart values are 15 minutes per cell and 69 rows == 1 Day*/
qxt_d().m_currentZoomDepth = 15 * 60;
qxt_d().m_currentViewMode = DayView;
qxt_d().m_startUnixTime = QDateTime(QDate::currentDate(),QTime(0, 0, 0)).toTime_t();
qxt_d().m_endUnixTime = QDateTime(QDate::currentDate().addDays(6),QTime(23, 59, 59)).toTime_t();
qxt_d().delegate = qxt_d().defaultDelegate = new QxtScheduleItemDelegate(this);
#if 0
qxt_d().m_vHeader = new QxtScheduleHeaderWidget(Qt::Vertical, this);
connect(qxt_d().m_vHeader, SIGNAL(geometriesChanged()), this, SLOT(updateGeometries()));
qxt_d().m_vHeader->hide();
qxt_d().m_hHeader = new QxtScheduleHeaderWidget(Qt::Horizontal, this);
connect(qxt_d().m_hHeader, SIGNAL(geometriesChanged()), this, SLOT(updateGeometries()));
qxt_d().m_hHeader->hide();
#else
//init will take care of initializing headers
qxt_d().m_vHeader = 0;
qxt_d().m_hHeader = 0;
#endif
}
示例3: QObject
/*!
* Creates a QxtRPCService object with the given \a parent.
*/
QxtRPCService::QxtRPCService(QObject* parent) : QObject(parent)
{
// Every QxtRPCService object has two private worker objects.
// QxtRPCServicePrivate is responsible for most of the heavy lifting.
QXT_INIT_PRIVATE(QxtRPCService);
// QxtRPCServiceIntrospector is responsible for capturing and processing incoming signals.
qxt_d().introspector = new QxtRPCServiceIntrospector(this);
}
示例4: QObject
/*!
* Contructs a new QxtFileLock. The lock is not activated.
* \a file the file that should be locked
* \a offset the offset where the lock starts
* \a length the length of the lock
* \a mode the lockmode
*/
QxtFileLock::QxtFileLock(QFile *file, const off_t offset, const off_t length, const QxtFileLock::Mode mode) : QObject(file)
{
QXT_INIT_PRIVATE(QxtFileLock);
connect(file, SIGNAL(aboutToClose()), this, SLOT(unlock()));
qxt_d().offset = offset;
qxt_d().length = length;
qxt_d().mode = mode;
}
示例5: QLineEdit
QxtLookupLineEdit::QxtLookupLineEdit(QWidget *parent)
: QLineEdit(parent)
{
QXT_INIT_PRIVATE(QxtLookupLineEdit);
qxt_d().m_dataColumn = qxt_d().m_lookupColumn = 0;
qxt_d().m_lookupRole = Qt::DisplayRole;
qxt_d().m_sourceModel = 0;
}
示例6: QAbstractSlider
/*!
Constructs a new QxtStars with \a parent.
*/
QxtStars::QxtStars(QWidget* parent) : QAbstractSlider(parent)
{
QXT_INIT_PRIVATE(QxtStars);
setOrientation(Qt::Horizontal);
setFocusPolicy(Qt::FocusPolicy(style()->styleHint(QStyle::SH_Button_FocusPolicy)));
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setRange(0, 5);
}
示例7: ServerProtocolInstanceIODevice
/**
* The constructor sets some default values in preperation for the connection
* @param serv Initialized pointer to the active Server ocject
* @param parentOptional parent for the QObject
*/
ServerProtocolInstanceSocket::ServerProtocolInstanceSocket(Server *serv, QObject *parent) : ServerProtocolInstanceIODevice(serv, parent)
{
QXT_INIT_PRIVATE(ServerProtocolInstanceSocket);
qxt_d().sd = -1;
qxt_d().pid = 0;
qxt_d().uid = 0;
qxt_d().gid = 0;
}
示例8: QXT_INIT_PRIVATE
QxtIrcMessage::QxtIrcMessage(const QxtIrcMessage &msg)
{
QXT_INIT_PRIVATE(QxtIrcMessage);
qxt_d().from = msg.qxt_d().from;
qxt_d().to = msg.qxt_d().to;
qxt_d().cmd = msg.qxt_d().cmd;
qxt_d().args.clear();
qxt_d().args = msg.qxt_d().args;
}
示例9: QObject
/**
* Constructor, associates with the server.
* @param server Initialized pointer to the Server object.
*/
ServerProtocolListenerBase::ServerProtocolListenerBase(Server *server)// : QObject(parent)
{
QXT_INIT_PRIVATE(ServerProtocolListenerBase);
if (QPointer<Server>(server).isNull())
{
qFatal("Fatal Error: ServerProtocolListener was passed a NULL Server* object.");
}
qxt_d().serv = server;
}
示例10: QObject
QxtMDNS::QxtMDNS(int id, QObject* parent)
: QObject(parent)
{
QXT_INIT_PRIVATE(QxtMDNS);
qxt_d().info = id;
qxt_d().client = NULL;
qxt_d().recordbrowser = NULL;
qxt_d().sent = false;
}
示例11: QxtAbstractHttpConnector
/*!
* Creates a QxtHttpServerConnector with the given \a parent and \a server.
*
* You may pass a QTcpServer subclass to the \a server parameter to enable customized behaviors, for
* instance to use QSslSocket like QxtHttpsServerConnector does. Pass 0 (the default) to \a server
* to allow QxtHttpServerConnector to create its own QTcpServer.
*/
QxtHttpServerConnector::QxtHttpServerConnector(QObject* parent, QTcpServer* server) : QxtAbstractHttpConnector(parent)
{
QXT_INIT_PRIVATE(QxtHttpServerConnector);
if(server)
qxt_d().server = server;
else
qxt_d().server = new QTcpServer(this);
QObject::connect(qxt_d().server, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
}
示例12: QXT_INIT_PRIVATE
/*!
Constructor.
*/
QxtBasicSTDLoggerEngine::QxtBasicSTDLoggerEngine()
{
QXT_INIT_PRIVATE(QxtBasicSTDLoggerEngine);
#ifndef QT_NO_DEBUG
setLogLevelsEnabled(QXT_REQUIRED_LEVELS);
#else
setLogLevelsEnabled(QXT_REQUIRED_LEVELS | QxtLogger::DebugLevel);
#endif
enableLogging();
}
示例13: QTableWidget
/*!
Constructs a new QxtTableWidget with \a parent.
*/
QxtTableWidget::QxtTableWidget(QWidget* parent)
: QTableWidget(parent)
{
QXT_INIT_PRIVATE(QxtTableWidget);
setItemPrototype(new QxtTableWidgetItem);
QxtItemDelegate* delegate = new QxtItemDelegate(this);
connect(delegate, SIGNAL(editingStarted(const QModelIndex&)),
&qxt_d(), SLOT(informStartEditing(const QModelIndex&)));
connect(delegate, SIGNAL(editingFinished(const QModelIndex&)),
&qxt_d(), SLOT(informFinishEditing(const QModelIndex&)));
setItemDelegate(delegate);
}
示例14: QTreeWidget
/*!
Constructs a new QxtTreeWidget with \a parent.
*/
QxtTreeWidget::QxtTreeWidget(QWidget* parent) : QTreeWidget(parent)
{
QXT_INIT_PRIVATE(QxtTreeWidget);
QxtItemDelegate* delegate = new QxtItemDelegate(this);
connect(delegate, SIGNAL(editingStarted(const QModelIndex&)),
&qxt_d(), SLOT(informStartEditing(const QModelIndex&)));
connect(delegate, SIGNAL(editingFinished(const QModelIndex&)),
&qxt_d(), SLOT(informFinishEditing(const QModelIndex&)));
connect(this, SIGNAL(itemPressed(QTreeWidgetItem*, int)),
&qxt_d(), SLOT(expandCollapse(QTreeWidgetItem*)));
setItemDelegate(delegate);
}
示例15: ClientProtocolIODevice
/**
* The constructor initializes the socket and the timeout timer and connects all the needed signals and slots. The constructor also calls ClientProtocolIODevice::prepareDevice() to prepare the socket for use.
* @param parent Optional parent for the QObject
*/
ClientProtocolTcp::ClientProtocolTcp(QObject *parent) : ClientProtocolIODevice(parent)
{
QXT_INIT_PRIVATE(ClientProtocolTcp);
qxt_d().timer.setInterval(10000);
connect(&qxt_d().timer, SIGNAL(timeout()), &qxt_d(), SLOT(ping()));
#ifndef QT_NO_OPENSSL
connect(&qxt_d().socket, SIGNAL(sslErrors(QList<QSslError>)), &qxt_d().socket, SLOT(ignoreSslErrors()));
#endif
connect(&qxt_d().socket, SIGNAL(disconnected()), &qxt_d().timer, SLOT(stop()));
connect(&qxt_d().socket, SIGNAL(disconnected()), this, SIGNAL(disconnected()));
qxt_d().lastPing = QDateTime::currentDateTime();
prepareDevice(&qxt_d().socket);
}