/*! 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); }
/*! * Constructs a QxtWebContent object with the specified \a parent. * * The content provided by this constructor is exactly the data contained in * \a content. This variation is ReadOnly. */ QxtWebContent::QxtWebContent(const QByteArray& content, QObject* parent) : QxtFifo(content, parent) { QXT_INIT_PRIVATE(QxtWebContent); qxt_d().init(content.size(), 0); setOpenMode(ReadOnly); }
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 }
/*! * 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); }
/*! * 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; }
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; }
/*! 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); }
/** * 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; }
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; }
QxtIrcMessage::QxtIrcMessage(QString f, QString t, QString c, QString a) { QXT_INIT_PRIVATE(QxtIrcMessage); qxt_d().from = f; qxt_d().to = t; qxt_d().cmd = c; qxt_d().args.clear(); qxt_d().args = QStringList() << a; }
QxtIrcMessage::QxtIrcMessage() { QXT_INIT_PRIVATE(QxtIrcMessage); qxt_d().from = ""; qxt_d().to = ""; qxt_d().cmd = ""; qxt_d().args = QStringList(); }
/** * 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; }
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; }
/*! * 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())); }
/*! Constructor. */ QxtBasicSTDLoggerEngine::QxtBasicSTDLoggerEngine() { QXT_INIT_PRIVATE(QxtBasicSTDLoggerEngine); #ifndef QT_NO_DEBUG setLogLevelsEnabled(QXT_REQUIRED_LEVELS); #else setLogLevelsEnabled(QXT_REQUIRED_LEVELS | QxtLogger::DebugLevel); #endif enableLogging(); }
/*! 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); }
/*! 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); }
/** * 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); }
/*! Constructs a new QxtCountryComboBox with \a parent. */ QxtCountryComboBox::QxtCountryComboBox(QWidget* parent) : QComboBox(parent) { QXT_INIT_PRIVATE(QxtCountryComboBox); #ifdef QXT_DESIGNER_MODE setEditable(false); #else setModel(new QxtCountryModel(this)); setModelColumn(0); setCurrentCountry(QLocale::system().country()); #endif connect(this, SIGNAL(currentIndexChanged(int)), &qxt_d(), SLOT(comboBoxCurrentIndexChanged(int))); }
QxtSmtp::QxtSmtp(QObject* parent) : QObject(parent) { QXT_INIT_PRIVATE(QxtSmtp); qxt_d().state = QxtSmtpPrivate::Disconnected; qxt_d().nextID = 0; #ifndef QT_NO_OPENSSL qxt_d().socket = new QSslSocket(this); QObject::connect(socket(), SIGNAL(encrypted()), this, SIGNAL(encrypted())); //QObject::connect(socket(), SIGNAL(encrypted()), &qxt_d(), SLOT(ehlo())); #else qxt_d().socket = new QTcpSocket(this); #endif QObject::connect(socket(), SIGNAL(connected()), this, SIGNAL(connected())); QObject::connect(socket(), SIGNAL(disconnected()), this, SIGNAL(disconnected())); QObject::connect(socket(), SIGNAL(error(QAbstractSocket::SocketError)), &qxt_d(), SLOT(socketError(QAbstractSocket::SocketError))); QObject::connect(this, SIGNAL(authenticated()), &qxt_d(), SLOT(sendNext())); QObject::connect(socket(), SIGNAL(readyRead()), &qxt_d(), SLOT(socketRead())); }
/*! Constructs a new QxtStdio with \a parent. */ QxtStdio::QxtStdio(QObject * parent): QxtPipe(parent) { QXT_INIT_PRIVATE(QxtStdio); setvbuf(stdin , NULL , _IONBF , 0); setvbuf(stdout , NULL , _IONBF , 0); setOpenMode(QIODevice::ReadWrite); qxt_d().notify = new QSocketNotifier( #ifdef Q_CC_MSVC _fileno(stdin) #else fileno(stdin) #endif , QSocketNotifier::Read, this); QObject::connect(qxt_d().notify, SIGNAL(activated(int)), &qxt_d(), SLOT(activated(int))); }
/*! Constructs a new QxtCheckComboBox with \a parent. */ QxtCheckComboBox::QxtCheckComboBox(QWidget* parent) : QComboBox(parent) { QXT_INIT_PRIVATE(QxtCheckComboBox); setModel(new QxtCheckComboModel(this)); connect(this, SIGNAL(activated(int)), &qxt_d(), SLOT(toggleCheckState(int))); connect(model(), SIGNAL(checkStateChanged()), &qxt_d(), SLOT(updateCheckedItems())); connect(model(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), &qxt_d(), SLOT(updateCheckedItems())); connect(model(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)), &qxt_d(), SLOT(updateCheckedItems())); // read-only contents QLineEdit* lineEdit = new QLineEdit(this); lineEdit->setReadOnly(true); setLineEdit(lineEdit); setInsertPolicy(QComboBox::NoInsert); view()->installEventFilter(&qxt_d()); view()->window()->installEventFilter(&qxt_d()); view()->viewport()->installEventFilter(&qxt_d()); this->installEventFilter(&qxt_d()); }
QxtCsvModel::QxtCsvModel(QObject *parent) : QAbstractTableModel(parent) { QXT_INIT_PRIVATE(QxtCsvModel); }
/*! * Constructs a new QxtSslServer object with the specified \a parent. */ QxtSslServer::QxtSslServer(QObject* parent) : QTcpServer(parent) { QXT_INIT_PRIVATE(QxtSslServer); qxt_d().autoEncrypt = true; }
/*! Constructs a basic file logger engine with \a fileName. */ QxtBasicFileLoggerEngine::QxtBasicFileLoggerEngine(const QString &fileName) : QxtAbstractFileLoggerEngine(fileName, QIODevice::ReadWrite | QIODevice::Append | QIODevice::Unbuffered) { QXT_INIT_PRIVATE(QxtBasicFileLoggerEngine); qxt_d().dateFormat = "hh:mm:ss.zzz"; }
/*! Constructs an XML file logger engine with file name. */ QxtXmlFileLoggerEngine::QxtXmlFileLoggerEngine(const QString& fileName) : QxtAbstractFileLoggerEngine(fileName, QIODevice::ReadWrite | QIODevice::Unbuffered) { QXT_INIT_PRIVATE(QxtXmlFileLoggerEngine); }
QtGlobalShortcut::QtGlobalShortcut(const QKeySequence& shortcut, QObject* parent) : QObject(parent) { QXT_INIT_PRIVATE(QtGlobalShortcut); setShortcut(shortcut); }
QtGlobalShortcut::QtGlobalShortcut(QObject* parent) : QObject(parent) { QXT_INIT_PRIVATE(QtGlobalShortcut); }
QxtCsvModel::QxtCsvModel(const QString filename, QObject *parent, bool withHeader, QChar separator) : QAbstractTableModel(parent) { QXT_INIT_PRIVATE(QxtCsvModel); QFile src(filename); setSource(&src, withHeader, separator); }
QxtCsvModel::QxtCsvModel(QIODevice *file, QObject *parent, bool withHeader, QChar separator) : QAbstractTableModel(parent) { QXT_INIT_PRIVATE(QxtCsvModel); setSource(file, withHeader, separator); }