Ejemplo n.º 1
0
QtnPropertySetSamplePS::QtnPropertySetSamplePS(QObject* parent)
    : QtnPropertySet(parent)
    , BoolProperty(*new QtnPropertyBool(this))
    , ButtonProperty(*new QtnPropertyButton(this))
    , ButtonLinkProperty(*new QtnPropertyButton(this))
    , RGBColor(*new QtnPropertyABColor(this))
    , FloatPropertySliderBox(*new QtnPropertyFloat(this))
    , DoubleProperty(*new QtnPropertyDouble(this))
    , FloatProperty(*new QtnPropertyFloat(this))
    , IntProperty(*new QtnPropertyInt(this))
    , UIntProperty(*new QtnPropertyUInt(this))
    , EnumProperty(*new QtnPropertyEnum(this))
    , EnumFlagsProperty(*new QtnPropertyEnumFlags(this))
    , QStringValue(*new QtnPropertyQString(this))
    , EnableSubPropertySet(*new QtnPropertyBool(this))
    , SubPropertySet(*new QtnPropertySetSubPropertySetType(this))
    , QPointProperty(*new QtnPropertyQPoint(this))
    , QSizeProperty(*new QtnPropertyQSize(this))
    , QRectProperty(*new QtnPropertyQRect(this))
    , QColorProperty(*new QtnPropertyQColor(this))
    , QFontProperty(*new QtnPropertyQFont(this))
    , SubPropertySet2(*new QtnPropertySetSubPropertySetType(this))
{
    init();
    connectSlots();
    connectDelegates();
}
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow) {
    ui->setupUi(this);
    this->setFixedSize(this->width(), this->height());
    connectSlots();
}
Ejemplo n.º 3
0
//---------------------------------------------------------
// Implementations
//---------------------------------------------------------
//-------------------------------------
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), m_ui(new Ui::MainWindow), m_lblSongInfo(NULL) {
  m_ui->setupUi(this);
  m_ui->dockWidgetLyrics->setWindowTitle(tr("Lyrics"));
#ifdef Q_OS_WIN32
  if(QSysInfo::WindowsVersion == QSysInfo::WV_WINDOWS10)
    setStyleSheet("QToolBar { background-color: white;};");
#endif
  setupActions();
  setupTrayIcon();
  setupDockMenu();
  setupToolbar();
  connectSlots();
  restoreGeometryAndState();
  m_ui->stackedWidget->setCurrentIndex(PAGE_HOME);
  onPageChanged(PAGE_HOME);

  qApp->setWindowIcon(Icons::mellowPlayer());
  setWindowIcon(Icons::mellowPlayer());

  // Setup controllers
  new UpdateController(this);
  new PlayerController(this);
  new StreamingServicesController(this);
  new NotificationsController(this);
  new HotkeysController(this);
  new MPRIS2Controller(this);
  new LyricsController(this);
}
Ejemplo n.º 4
0
AddressDialog::AddressDialog(QWidget *parent) :
		QDialog(parent),
		m_ui(new Ui::AddressDialog)
{
	m_ui->setupUi(this);
	// Windows Mobile Window Flags
	setWindowFlags( windowFlags() & ( ~Qt::WindowOkButtonHint ) );
	setWindowFlags( windowFlags() | Qt::WindowCancelButtonHint );

	bool increaseFontSize = true;
#ifdef Q_WS_MAEMO_5
	setAttribute( Qt::WA_Maemo5StackedWindow );
	m_ui->characterList->hide();
	increaseFontSize = false;
#endif

	m_skipStreetPosition = false;
	m_ui->suggestionList->setAlternatingRowColors( true );
	m_ui->characterList->setAlternatingRowColors( true );
	if ( increaseFontSize ) {
		QFont font = m_ui->suggestionList->font();
		font.setPointSize( font.pointSize() * 1.5 );
		m_ui->suggestionList->setFont( font );
		m_ui->characterList->setFont( font );
	}
	resetCity();
	connectSlots();
}
Ejemplo n.º 5
0
/*!
 \brief

 \fn cdegs_main::cdegs_main
 \param parent
*/
cdegs_main::cdegs_main(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::cdegs_main){
    ui->setupUi(this);

    connectSlots();
}
DisplayMapControl::DisplayMapControl(GetDataDisplayMapInterface& inter,QObject* parent) : QObject(parent)
{
    map = new Map();
    //map->setGeometry(QRect(90,0,1000,600));
    connectSlots(inter);

    //
    ///FOR TESTING ONLY, REMOVE
    //
    /*for(int i=0;i<9;i++)
    {
        Area * a = new Area(i);

        Facility* c = new Facility(1234,"Johnson Hospital"+QString::number(i),0,0,0,QPoint(200+rand()%800,350+rand()%100));
        a->addFacility(c);
        for(int i=0;i<40;i++)
        {
            CareType ct = Convenience::intToCareType(rand()%2);
            c->addPatientToBed(new Patient("111-111-11"+QString::number(i),"fdsaf","Fdsaf",ct),ct);
        }
        this->addFacility(c);
        delete a;
    }
    for(int i=0;i<9;i++)
    {
        Area * a = new Area(i);
        Facility* c = new Facility(1234,"Johnson LTC Facil"+QString::number(i),0,0,rand()%40,QPoint(200+rand()%800,350+rand()%100));
        a->addFacility(c);
        for(int i=0;i<10;i++)
            c->addPatientToBed(new Patient("111-111-11"+QString::number(i),"fdsaf","Fdsaf",Convenience::intToCareType(EOBC::LTC)),Convenience::intToCareType(2));
        this->addFacility(c);
        delete a;
    }*/
}
Ejemplo n.º 7
0
QtnPropertySetAA::QtnPropertySetAA(QObject* parent)
    : QtnPropertySet(parent)
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 8
0
//=============================================================================
// Constructor of the class CCommunication.
//=============================================================================
CCommunication::CCommunication (QWidget *parent, const char *name, QSqlDatabase *db,
                                CUserData *current)
	: QWidget (parent,name)
{
  int   i;
  
  mContentChanged = false;
  mNew            = false;
  mDB             = db;
  mCurrentUser    = current;

  //----------------------------------------------------------------------------
  //  Create the layout
  //----------------------------------------------------------------------------
  mLayout = new QGridLayout (this, 10, 2, 10);

  //----------------------------------------------------------------------------
  //  Create four default rows consisting of combobox and lineedit.
  //----------------------------------------------------------------------------
  for (i = 0; i < 4; i++)
    slotAddLine();
  
  setReadonly (true);
  connectSlots();
}
Ejemplo n.º 9
0
PaintedSlider::PaintedSlider(WSlider *slider)
  : WPaintedWidget(),
    slider_(slider),
    sliderReleased_(this, "released")
{
  setStyleClass("Wt-slider-bg");

  slider_->addStyleClass
    (std::string("Wt-slider-")
     + (slider_->orientation() == Orientation::Horizontal ? "h" : "v"));

  if (slider_->positionScheme() == PositionScheme::Static) {
    slider_->setPositionScheme(PositionScheme::Relative);
    slider_->setOffsets(0, Side::Left | Side::Top);
  }

  manageWidget(fill_, std::unique_ptr<WInteractWidget>(new WContainerWidget()));
  manageWidget(handle_, slider_->createHandle());

  fill_->setPositionScheme(PositionScheme::Absolute);
  fill_->setStyleClass("fill");

  handle_->setPositionScheme(PositionScheme::Absolute);
  handle_->setStyleClass("handle");

  connectSlots();
}
Ejemplo n.º 10
0
ConfigurationManager::ConfigurationManager(ItemFactory *itemFactory, QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::ConfigurationManager)
    , m_options()
{
    ui->setupUi(this);
    connectSlots();
    setWindowIcon(appIcon());

    connect( ui->configTabShortcuts, &ConfigTabShortcuts::commandsSaved,
             this, &ConfigurationManager::commandsSaved );

    ui->spinBoxItems->setMaximum(Config::maxItems);

    if ( itemFactory && itemFactory->hasLoaders() )
        initPluginWidgets(itemFactory);
    else
        ui->tabItems->hide();

    initOptions();

    if (itemFactory)
        ui->configTabAppearance->createPreview(itemFactory);

    loadSettings();

    if (itemFactory)
        ui->configTabShortcuts->addCommands( itemFactory->commands() );
}
Ejemplo n.º 11
0
QtnPropertySetTest12::QtnPropertySetTest12(QObject* parent)
    : QtnPropertySet(parent)
    , p(*qtnCreateProperty<QtnPropertyEnum>(this))
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 12
0
ConfigurationManager::ConfigurationManager()
    : ui(new Ui::ConfigurationManager)
    , m_options()
{
    ui->setupUi(this);
    connectSlots();
    initOptions();
}
Ejemplo n.º 13
0
Preferences::Preferences (QWidget* parent) : QWidget (parent)
{
    createWidgets();
    createLayouts();

    readSettings();
    connectSlots();
}
Ejemplo n.º 14
0
QWSMainWindow::QWSMainWindow()
{
	setWindowTitle(QStringLiteral("配置工具软件"));
	setMinimumSize(WINDOW_MIN_WIDHT, WINDOW_MIN_HEIGHT);

	init();
	connectSlots();
}
Ejemplo n.º 15
0
QtnPropertySetAllPropertyTypes::QtnPropertySetAllPropertyTypes(QObject* parent)
    : QtnPropertySet(parent)
    , bp(*qtnCreateProperty<QtnPropertyBool>(this))
    , bpc(*qtnCreateProperty<QtnPropertyBoolCallback>(this))
    , ip(*qtnCreateProperty<QtnPropertyInt>(this))
    , ipc(*qtnCreateProperty<QtnPropertyIntCallback>(this))
    , up(*qtnCreateProperty<QtnPropertyUInt>(this))
    , upc(*qtnCreateProperty<QtnPropertyUIntCallback>(this))
    , fp(*qtnCreateProperty<QtnPropertyFloat>(this))
    , fpc(*qtnCreateProperty<QtnPropertyFloatCallback>(this))
    , dp(*qtnCreateProperty<QtnPropertyDouble>(this))
    , dpc(*qtnCreateProperty<QtnPropertyDoubleCallback>(this))
    , sp(*qtnCreateProperty<QtnPropertyQString>(this))
    , spc(*qtnCreateProperty<QtnPropertyQStringCallback>(this))
    , rp(*qtnCreateProperty<QtnPropertyQRect>(this))
    , rpc(*qtnCreateProperty<QtnPropertyQRectCallback>(this))
    , pp(*qtnCreateProperty<QtnPropertyQPoint>(this))
    , ppc(*qtnCreateProperty<QtnPropertyQPointCallback>(this))
    , szp(*qtnCreateProperty<QtnPropertyQSize>(this))
    , szpc(*qtnCreateProperty<QtnPropertyQSizeCallback>(this))
    , ep(*qtnCreateProperty<QtnPropertyEnum>(this))
    , epc(*qtnCreateProperty<QtnPropertyEnumCallback>(this))
    , efp(*qtnCreateProperty<QtnPropertyEnumFlags>(this))
    , efpc(*qtnCreateProperty<QtnPropertyEnumFlagsCallback>(this))
    , cp(*qtnCreateProperty<QtnPropertyQColor>(this))
    , cpc(*qtnCreateProperty<QtnPropertyQColorCallback>(this))
    , fnp(*qtnCreateProperty<QtnPropertyQFont>(this))
    , fnpc(*qtnCreateProperty<QtnPropertyQFontCallback>(this))
    , bttn(*qtnCreateProperty<QtnPropertyButton>(this))
    , ppf(*qtnCreateProperty<QtnPropertyQPointF>(this))
    , ppfc(*qtnCreateProperty<QtnPropertyQPointFCallback>(this))
    , rpf(*qtnCreateProperty<QtnPropertyQRectF>(this))
    , rpfc(*qtnCreateProperty<QtnPropertyQRectFCallback>(this))
    , szpf(*qtnCreateProperty<QtnPropertyQSizeF>(this))
    , szpfc(*qtnCreateProperty<QtnPropertyQSizeFCallback>(this))
    , _b(true)
{
    
        _i =12;
        _ui = 9;
        _f = 0.2f;
        _d = 32.4;
        _s = "name";
        _r = QRect(10, 10, 10, 10);
        _rf = QRectF(10.1, 10.2, 10.3, 10.4);
        _p = QPoint(9, 2);
        _pf = QPointF(9.9, 2.2);
        _sz = QSize(33, 21);
        _szf = QSizeF(33.0, 21.9);
        _e = COLOR::RED;
        _ef = MASK::ONE|MASK::FOUR;
        _cl = QColor(Qt::red);
        _fn = QFont("Arial", 19);
    
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 16
0
/* 
 *  Constructs a prefDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
prefDialog::prefDialog( QWidget* parent, Qt::WFlags fl )
	: QDialog( parent, fl )
{

	ui.setupUi(this);
	connectSlots();
	loadSetting();

}
Ejemplo n.º 17
0
Preferences::Preferences (QWidget* parent) : QWidget (parent) {
    createWidgets();
    createLayouts();

    readSettings();
    connectSlots();

    DS::log (DS::kInfoLevel, "MainWindow: Preferences widget created");
}
Ejemplo n.º 18
0
QtnPropertySetTest1::QtnPropertySetTest1(QObject* parent)
    : QtnPropertySet(parent)
    , a(*qtnCreateProperty<QtnPropertyInt>(this))
    , text(*qtnCreateProperty<QtnPropertyQString>(this))
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 19
0
SettingsWindow::SettingsWindow()
{
    createWidgets();
    createLayouts();
    connectSlots();

    readSettings();
    applySettings();
}
Ejemplo n.º 20
0
QtnPropertySetYY::QtnPropertySetYY(QObject* parent)
    : QtnPropertySet(parent)
    , rect(*qtnCreateProperty<QtnPropertyQRect>(this))
    , s(*qtnCreateProperty<QtnPropertyQString>(this))
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 21
0
RegionSelectorController::RegionSelectorController(RegionSelectorGui gui, RegionSelectorSettings settings, QObject* parent)
    : QObject(parent),
      gui(gui),
      settings(settings) {

    init();
    setupPresets();
    connectSlots();
}
Ejemplo n.º 22
0
QtnPropertySetSS::QtnPropertySetSS(QObject* parent)
    : QtnPropertySet(parent)
    , a(*qtnCreateProperty<QtnPropertyBool>(this))
    , aa(*qtnCreateProperty<QtnPropertySetAA>(this))
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 23
0
QtnPropertySetTextAttributes::QtnPropertySetTextAttributes(QObject* parent)
    : QtnPropertySet(parent)
    , WordWrap(*new QtnPropertyBool(this))
    , Height(*new QtnPropertyInt(this))
    , Color(*new QtnPropertyQColor(this))
{
    init();
    connectSlots();
    connectDelegates();
}
Ejemplo n.º 24
0
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    createObjects();
    configureGUI();
    printIpAddresses();
    connectSlots();
}
Ejemplo n.º 25
0
LinTVPlay::LinTVPlay(QWidget *parent, const QString & filename)
    : m_parent(parent),
      m_device(filename)
{
    m_deviceType = LinTVDeviceInfo::File;
    m_mplayerProcess = new LinTVProcess(this);

    loadDefaultValues();
    connectSlots();
}
Ejemplo n.º 26
0
MainWindow::MainWindow(QApplication *a, QWidget *parent) :
    QMainWindow(parent)
{
    MainWindow::quit= new QPushButton("Quit App");
    QObject::connect(quit, SIGNAL(clicked()), a, SLOT(quit()));
    domParser = new DOMParser();
    initGui();
    connectSlots();
    adapterMap = new QMap<QString, AgentInterface*>;
    initConnectors();
}
Ejemplo n.º 27
0
/**
 * Connects the signals/slots between the \c DriverStation and the logger
 */
DSEventLogger::DSEventLogger()
{
    m_init = 0;
    m_dump = NULL;
    m_currentLog = "";

    init();

    saveDataLoop();
    connectSlots();
}
Ejemplo n.º 28
0
KSPhrase::KSPhrase(QWidget *parent, const QString &caption)
  : KDialogBase(parent, "KSPhrase", true, caption, Ok|Apply|Cancel), m_edit(false), m_modified(false)
{
  m_create=true;
  initialize();
  enableButtonApply(false);

  setMainWidget(m_mainWidget);

  connectSlots();
}
Ejemplo n.º 29
0
void Note::setText(const QString & text, bool check) {
	// disconnect the signal so it doesn't fire recursively
	disconnectSlots();
	QString oldText = text;
	m_graphicsTextItem->document()->setHtml(text);
	connectSlots();

	if (check) {
		QSizeF newSize;
		checkSize(newSize);
		forceFormat(0, m_graphicsTextItem->document()->characterCount());
	}
}
Ejemplo n.º 30
0
void SMEngine::startEngine(){

    widgetMap.insert("inputWidget", new InputWidget());
    widgetMap.insert("infoWidget", new InfoWidget());
    widgetMap.insert("dialogWidget", new DialogWidget());
    //widgetMap.insert("initialWidget", new InitialWidget(smGui));
    SMEngine::personData = new QList< QMap<QString, QString> >;
    SMEngine::widgetData = new QList< QMap<QString, QString> >;
    Logger::getInstance().log("SMEngine initialized", loglevel);
    parseXMLFile("fileName");   //TODO: change signature
    QVBoxLayout *layout = new QVBoxLayout();
    connectSlots();
}