Esempio n. 1
0
void Layouts_init(void) {
    if (ARRAY_size(layouts_) < TAG_USERDEFINED)
        Layouts_setLargestTag(TAG_USERDEFINED-1);
    Layout* l = initLayout(TAG_EVALUATING);
    l->type = LAYOUT_SMALL_NOPTRS;
    l->x.noPtrs.nWords = 1;
    l = initLayout(TAG_INDIRECT);
    l->type = LAYOUT_INDIRECT;
}
AutomaticAddContactsConfigureDialog::AutomaticAddContactsConfigureDialog(QWidget *parent)
    : PimCommon::ConfigurePluginDialog(parent),
      mConfigureWidget(Q_NULLPTR)
{
    setWindowTitle(i18n("Configure \"Automatic Add Contacts\" Plugin"));
    initLayout();
}
Esempio n. 3
0
/**
 * @brief Constructor specifying an axes subplot spec and optional parent.
 * An Axes with the given subplot specification is created on construction
 * See
 * https://matplotlib.org/2.2.3/api/_as_gen/matplotlib.figure.Figure.html?highlight=add_subplot#matplotlib.figure.Figure.add_subplot
 * @param subplotspec A matplotlib subplot spec defined as a 3-digit integer
 * @param facecolor String denoting the figure's facecolor
 * @param parent The owning parent widget
 */
FigureCanvasQt::FigureCanvasQt(int subplotspec, QWidget *parent)
    : QWidget(parent), InstanceHolder(createPyCanvas(subplotspec), "draw"),
      m_figure(Figure(Python::Object(pyobj().attr("figure")))) {
  // Cannot use delegating constructor here as InstanceHolder needs to be
  // initialized before the axes can be created
  m_mplCanvas = initLayout(this);
}
/** Constructor */
QtDataProcessorOptionsDialog::QtDataProcessorOptionsDialog(
    DataProcessorView *view, DataProcessorPresenter *presenter)
    : QDialog(dynamic_cast<QWidget *>(view)), m_presenter(presenter) {
  initLayout();
  initBindings();
  loadOptions();
}
CallItemView::CallItemView(CallItem *controller)
    : MWidgetView(controller),
      //% "00:00:00"
      m_duration(new MLabel(qtTrId("xx_default_duration"), controller)),
      //% "..."
      m_status(new MLabel(qtTrId("xx_default_status"), controller)),
      m_updateTimer(this)
{
    TRACE

    m_controller = controller;
    m_layout = new QGraphicsGridLayout;
    m_layout->setContentsMargins(0,0,0,0);
    m_layout->setSpacing(0);
    m_controller->setLayout(m_layout);

    m_status->setAlignment(Qt::AlignCenter);

    if (peopleItem())
        peopleItem()->setObjectName("callItemPeopleItem");
    m_status->setObjectName("callItemStatusName");

    initLayout();

    connect(m_controller, SIGNAL(stateChanged()), SLOT(updateStatusLabel()));
}
Esempio n. 6
0
/* initGui must be called to initialize the structures used by the GUI */
int initGUI(int level) {
  int i;
  int n = CARD_NUMBER;
  char cardName[50];
  if (i_initGUI) return(-1);  /* check the flag of GUI initialized*/

  markIndex = 0;                /* mark color index*/
  for (i=0; i<n; i++) {
    if (i<10) sprintf(cardName, "%s/0%1d.xpm", xpmdir, i);
    else      sprintf(cardName, "%s/%2d.xpm", xpmdir, i);
    read_cmap(cardName, &(mycard[i]));
  }
  initLayout(level);
  rootColor = NULL;
  doColorTable(mycard, 0, n);
  initGraphics();
  setBlack(& mycard[ EMPTY_CARD ]);

  initColors();
  remapColor(mycard, 0, CARD_NUMBER-1);
  initWindow();
  initImages(mycard, 0, CARD_NUMBER-1);
  drawMenu();

  /* printf(" Nex Graphics done \n"); */
  i_initGUI = 1;           /* set the flag of GUI initialized*/
  return(0);
}
Esempio n. 7
0
PairAlign::PairAlign(MSAEditor* _msa)
    : msa(_msa), pairwiseAlignmentWidgetsSettings(_msa->getPairwiseAlignmentWidgetsSettings()),
    distanceCalcTask(NULL), settingsWidget(NULL),
    showHideSequenceWidget(NULL), showHideSettingsWidget(NULL), showHideOutputWidget(NULL),
    saveController(NULL), savableTab(this, GObjectViewUtils::findViewByName(_msa->getName())),
    showSequenceWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showSequenceWidget),
    showAlgorithmWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showAlgorithmWidget),
    showOutputWidget(_msa->getPairwiseAlignmentWidgetsSettings()->showOutputWidget),
    firstSequenceSelectionOn(false), secondSequenceSelectionOn(false),
    sequencesChanged(true), sequenceNamesIsOk(false), alphabetIsOk(false)
{
    SAFE_POINT(NULL != msa, "MSA Editor is NULL.", );
    SAFE_POINT(NULL != pairwiseAlignmentWidgetsSettings, "pairwiseAlignmentWidgetsSettings is NULL.", );

    setupUi(this);

    firstSeqSelectorWC = new SequenceSelectorWidgetController(msa);
    firstSeqSelectorWC->setObjectName("firstSeqSelectorWC");
    secondSeqSelectorWC = new SequenceSelectorWidgetController(msa);
    secondSeqSelectorWC->setObjectName("secondSeqSelectorWC");

    firstSequenceLayout->addWidget(firstSeqSelectorWC);
    secondSequenceLayout->addWidget(secondSeqSelectorWC);

    initLayout();
    initSaveController();
    connectSignals();
    initParameters();

    U2WidgetStateStorage::restoreWidgetState(savableTab);

    checkState();
}
Esempio n. 8
0
void KBookmarkDialogPrivate::initLayoutPrivate()
{
    title = new QLineEdit(q);
    title->setMinimumWidth(300);
    titleLabel = new QLabel(KBookmarkDialog::tr("Name:", "@label:textbox"), q);
    titleLabel->setBuddy(title);

    url = new QLineEdit(q);
    url->setMinimumWidth(300);
    urlLabel = new QLabel(KBookmarkDialog::tr("Location:", "@label:textbox"), q);
    urlLabel->setBuddy(url);

    comment = new QLineEdit(q);
    comment->setMinimumWidth(300);
    commentLabel = new QLabel(KBookmarkDialog::tr("Comment:", "@label:textbox"), q);
    commentLabel->setBuddy(comment);

    folderTree = new QTreeWidget(q);
    folderTree->setColumnCount(1);
    folderTree->header()->hide();
    folderTree->setSortingEnabled(false);
    folderTree->setSelectionMode(QTreeWidget::SingleSelection);
    folderTree->setSelectionBehavior(QTreeWidget::SelectRows);
    folderTree->setMinimumSize(60, 100);
    QTreeWidgetItem *root = new KBookmarkTreeItem(folderTree);
    fillGroup(root, mgr->root());

    buttonBox = new QDialogButtonBox(q);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    q->connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
    q->connect(buttonBox, &QDialogButtonBox::rejected, q, &QDialog::reject);

    initLayout();
    layout = true;
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
    StringProvider::loadTemplate();

    ui->setupUi(this);

    initLayout();

    sqlLiteProvider = new SqlLiteProvider();
    connect(sqlLiteProvider, SIGNAL(updateEventLogUI(QList<EventLog>)),
            this, SLOT(sloUpdateEventLogUI(QList<EventLog>)));
    sqlLiteProvider->loadDatabase();

    httpProvider = new HttpProvider();
    connect(httpProvider, SIGNAL(sigHttpFinished(QNetworkReply*)),
            this, SLOT(sloHttpFinished(QNetworkReply*)));

    connect(ui->tableScan, SIGNAL(signalInsertLog(EventLog)),
            this, SLOT(slotInsertLog(EventLog)));

    // Load metascan online key
    QSettings qs(SETTINGS_DOMAIN, SETTINGS_USER);
    QString moKey = qs.value(SETTINGS_MO_KEY).toString();
    StringProvider::METASCAN_ONLINE_KEY = moKey;
    if(moKey.isEmpty()) {
        qDebug() << "moKey = NULLLLL";
        SettingsDialog* dialogSettings = new SettingsDialog(this);
        dialogSettings->setModal(true);
        dialogSettings->show();
    } else {
        qDebug() << "moKey = " << moKey;
    }
}
Esempio n. 10
0
AbstractDialog::AbstractDialog(const char *title)
: Window(10, 10, 60, 12, title, TYPE_TOP)
{
  /// @todo Set correct position.

  initLayout();
}
Esempio n. 11
0
/**
 * Constructor
 */
FindReplaceDialog::FindReplaceDialog(ScriptEditor *editor, Qt::WFlags fl)
  : QDialog(editor, fl), m_editor(editor), 
    m_findInProgress(false)
{
 initLayout();
 setSizeGripEnabled(true);
}
Esempio n. 12
0
bool UI::initWithTag(int tag){
    if (!cocos2d::Scene::init()) {
        return false;
    }
    switch (tag) {
        case 1:
            initScale9Sprite();
            break;
            
        case 2:
            initListView();
            break;
            
        case 3:
            initLoadingBar();
            break;
            
        case 4:
            initPageView();
            break;
            
        case 5:
            initSliderView();
            break;
            
        case 6:
            initButton();
            break;
            
        case 7:
            initCheckBox();
            break;
            
        case 8:
            initImageView();
            break;
            
        case 9:
            initEditBox();
            break;
            
        case 10:
            initSrollView();
            break;
            
        case 11:
            initLayout();
            break;
        
            
        default:
            break;
    }
    
    
    
    
    return true;
}
CreateAnnotationOptionsPanelWidget::CreateAnnotationOptionsPanelWidget(QWidget *parent) :
    CreateAnnotationWidget(parent)
{
    setupUi(this);
    initLayout();
    init();
    connectSignals();
}
Esempio n. 14
0
RightSidebar::RightSidebar(QWidget *parent) :
    QWidget(parent)
{
    initLayout();
    createConnection();
    slotGetAllApply();

}
Esempio n. 15
0
QTextLayout *ChatItem::layout() const {
  if(_cachedLayout)
    return _cachedLayout;

  _cachedLayout = new QTextLayout;
  initLayout(_cachedLayout);
  chatView()->setHasCache(chatLine());
  return _cachedLayout;
}
Esempio n. 16
0
MainWin::MainWin(QWidget *parent)
: QWidget(parent), accountId_(-1), currentCall_(-1),
  preview_on(false), video_(NULL), video_prev_(NULL)
{
    theInstance_ = this;

    initLayout();
    emit signalCallReleased();
}
Esempio n. 17
0
Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog)
{
    ui->setupUi(this);
    initTimer();
    initTray();
    initLayout();
}
Esempio n. 18
0
/**
	Constructeur
	@param project projet a visualiser
	@param parent Widget parent
*/
ProjectView::ProjectView(QETProject *project, QWidget *parent) :
	QWidget(parent),
	project_(0)
{
	initActions();
	initWidgets();
	initLayout();
	
	setProject(project);
}
Esempio n. 19
0
/* constructor */
InfoBar::InfoBar()
{
	initSettings();
	initWidget();
	initImageWindow();
	initStatWindow();
	initHexWindow();
	initLayout();
	initTimer();
}
Esempio n. 20
0
MainWindow::MainWindow()
{
	resize(800, 600);

	initMenuAndActions();
	initContentEditors();
	initModelsList();
	initEditorsWidgets();
	initLayout();
}
ValueTabView::ValueTabView(const QString& name, QWidget * parent)
    : controller(parent), formatter(AbstractFormatter::getFormatter()),
      currentCell(nullptr)
{    
    initLayout();

    initKeyName();
    keyName->setText(name);

    initFormatter();
}
void MAdvancedListItem::setItemStyle(ItemStyle itemStyle)
{
    Q_D(MAdvancedListItem);

    if (itemStyle == d->listItemStyle)
        return;

    d->listItemStyle = itemStyle;
    d->isLayoutInitialized = false;
    initLayout();
}
Esempio n. 23
0
TimerWindow::TimerWindow(QWidget *parent) :
    QWidget(parent)
{
#ifndef USE_DB_HELPER
    manager = new QNetworkAccessManager(this);
#endif
    initLayout();
    createTimer();
    createConnect();
    getWeekData();
}
Esempio n. 24
0
LayersMgrWidget::LayerWidget::
LayerWidget(wxWindow* parent, Layer* layer)
	: wxPanel(parent)
	, m_editable(NULL)
	, m_visible(NULL)
	, m_selectable(NULL)
	, m_name(NULL)
	, m_layer(layer)
{
	initLayout();
}
Esempio n. 25
0
void App::initInterface(void) {
    thePanel = new QWidget();

    initMenu();
    initLayout();
    initSlots();

    radSourceFile->setChecked(true);
    radTargetFile->setChecked(true);

    this->setCentralWidget(thePanel);
}
Esempio n. 26
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    window = this;
    ui->setupUi(this);
    initLayout();
    initWebViewAttributes();
    initAppEngine();
    // 延时至 exec() 的消息循环启动,否则 close 、hiden 等方法会失效。
    QTimer::singleShot(1, this, SLOT(initUserScript()));
}
Esempio n. 27
0
SceneSet::SceneSet(void)
{	
	initLayout();
	initPoperty();
	makeConnect();
	QString strStyleLabel = "";
	strStyleLabel = 
		"QWidget {background-color:qlineargradient(x1: 0.5, y1: 1, x2: 0.5, y2: 0,stop: 0 rgb(207,217,247), stop: 0.5 #FFFFFF, stop: 1 rgb(207,217,247));}"
		"QLabel {background-color:qlineargradient(x1: 0.5, y1: 1, x2: 0.5, y2: 0,stop: 0 rgb(207,217,255), stop: 0.5 #FAFAFF, stop: 1 rgb(217,217,255));}"
		"QWidget{font-size:14px;}";
	this->setStyleSheet( strStyleLabel );
}
Esempio n. 28
0
void Simonoid::init() {
  kDebug() << "Restoring";
  KConfigGroup lconfig = config();
  m_layouttype = ( LayoutType ) lconfig.readEntry ( "LayoutType", ( int ) LayoutTiny);
  m_interval = lconfig.readEntry ( "RefreshInterval", 3 );

  kDebug() << "Restored to: " << m_layouttype << m_interval;
  
  kDebug() << "Init called";
  Plasma::Applet::init();

  if ( m_icon.isNull() ) {
    setFailedToLaunch ( true, i18n ( "Could not load Simon icon." ) );
    exit ( -1 );
  }

  m_meter = new Plasma::Meter;
  m_meter->setVisible ( true );
  m_meter->setMeterType ( Plasma::Meter::BarMeterHorizontal );
//   m_meter->setMaximumWidth ( 32 );
//   m_meter->setSizePolicy ( QSizePolicy::Maximum, QSizePolicy::Expanding );
  m_meter->setMaximum ( 100 );
  m_meter->setValue ( 0 );

  m_lb_status = new Plasma::Label;
  m_lb_status->setText ( i18n ( "Status:" ) );
  m_lb_status_value = new Plasma::Label;
  m_lb_status_value->setText ( "1" );

  m_lb_peak = new Plasma::Label;
  m_lb_peak->setText ( i18n ( "Peak:" ) );
  m_lb_peak_value = new Plasma::Label;
  m_lb_peak_value->setText ( "2" );

  m_simonicon = new Plasma::IconWidget();
//   m_simonicon->setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Maximum );
  m_simonicon->setIcon ( m_icon );
  m_simonicon->setOrientation ( Qt::Vertical );
  m_simonicon->setDrawBackground ( true );
  //m_simonicon->setMaximumHeight(36);
  m_simonicon->setAcceptDrops ( false );
  

  initLayout ( m_layouttype );
  m_interval = m_interval;

  connect ( &m_checkConnectionTimer, SIGNAL (timeout()), this, SLOT (checkConnection()) );
  m_checkConnectionTimer.start ( 1000*m_interval );

  checkConnection();
  update();
}
BrushSettingsWindow::BrushSettingsWindow(QAction *attachedAction, QWidget *parent)
    : ComponentWindow(attachedAction, parent), maxBrushSize(200)
{
    setWindowTitle(tr("Brush Settings"));
    setMinimumWidth(150);
    setMinimumHeight(50);

    currentPen = QPen();
    currentPen.setCapStyle(Qt::RoundCap);
    currentPen.setWidth(5);

    initLayout();
}
Esempio n. 30
0
void Simonoid::configAccepted() {
  if ( m_configpage ) {
    m_layouttype = ( LayoutType ) m_uiconfig.cb_layout->currentIndex();
    m_interval = m_uiconfig.ni_interval->value();
  }

  m_checkConnectionTimer.setInterval ( 1000*m_interval );

  initLayout ( m_layouttype );

  update();
  emit configNeedsSaving();
  m_configpage->deleteLater();
}