当前位置: 首页>>代码示例>>C++>>正文


C++ Column类代码示例

本文整理汇总了C++中Column的典型用法代码示例。如果您正苦于以下问题:C++ Column类的具体用法?C++ Column怎么用?C++ Column使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Column类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Column

Column* DatapickerCurve::appendColumn(const QString& name) {
	Column* col = new Column(i18n("Column"), AbstractColumn::Numeric);
	col->insertRows(0, m_datasheet->rowCount());
	col->setName(name);
	m_datasheet->addChild(col);

	return col;
}
开发者ID:gerlachs,项目名称:labplot,代码行数:8,代码来源:DatapickerCurve.cpp

示例2: tableColumnFunction

/**
 * \brief Implements column() function for tables.
 *
 * \arg \c columnPath Path to the column to read data from. See
 * resolveColumnPath().
 *
 * The row to read from is determined by the muParser variable "i" set during
 * iteration of a column
 * formula. For explicitly specifying the row, use cell() instead.
 *
 * \sa tableCellFunction()
 */
double MuParserScript::tableColumnFunction(const char *columnPath) {
  Column *column =
      s_currentInstance->resolveColumnPath(QString::fromUtf8(columnPath));
  if (!column) return NAN;  // failsafe, shouldn't happen
  int row = qRound(s_currentInstance->m_variables["i"]) - 1;
  if (column->isInvalid(row)) throw new EmptySourceError();
  return column->valueAt(row);
}
开发者ID:gitter-badger,项目名称:AlphaPlot,代码行数:20,代码来源:MuParserScript.cpp

示例3: extract

void IOracle::extract(DoubleVector const & x, Column & column) {
  for (int v(0); v < _input->nV(); ++v) {
    if (x[v] > 0.5) {
      column.insert(v);
    }
  }
  column.cost() = column.computeCost();
}
开发者ID:klorel,项目名称:clusterisator,代码行数:8,代码来源:IOracle.cpp

示例4: Apply

void SumAggregator::Apply(const Table::Ptr& table, const Value& row)
{
	Column column = table->GetColumn(m_SumAttr);

	Value value = column.ExtractValue(row);

	m_Sum += value;
}
开发者ID:TheFlyingCorpse,项目名称:icinga2,代码行数:8,代码来源:sumaggregator.cpp

示例5: fill

void fill(Column::Type type, QListWidget* lw, const QString& path){
    Column* column = Column::make(type);
        column->createRows(path);
        setWindowTitle(type, lw);
        lw->show();
        lw->addItems(column->getRows());
    delete column;
}
开发者ID:rasmadeus,项目名称:AutoTM,代码行数:8,代码来源:main.cpp

示例6: UnifySameSizedColumnSizes

    void ColumnSet::CalculateSize()
    {
        gfx::Size pref;
        // Reset the preferred and remaining sizes.
        for(std::vector<ViewState*>::iterator i = view_states_.begin();
            i!=view_states_.end(); ++i)
        {
            ViewState* view_state = *i;
            if(!view_state->pref_width_fixed || !view_state->pref_height_fixed)
            {
                pref = view_state->view->GetPreferredSize();
                if(!view_state->pref_width_fixed)
                {
                    view_state->pref_width = pref.width();
                }
                if(!view_state->pref_height_fixed)
                {
                    view_state->pref_height = pref.height();
                }
            }
            view_state->remaining_width = pref.width();
            view_state->remaining_height = pref.height();
        }

        // Let layout element reset the sizes for us.
        LayoutElement::ResetSizes(&columns_);

        // Distribute the size of each view with a col span == 1.
        std::vector<ViewState*>::iterator view_state_iterator =
            view_states_.begin();
        for(; view_state_iterator!=view_states_.end()&&
            (*view_state_iterator)->col_span==1; ++view_state_iterator)
        {
            ViewState* view_state = *view_state_iterator;
            Column* column = columns_[view_state->start_col];
            column->AdjustSize(view_state->pref_width);
            view_state->remaining_width -= column->Size();
        }

        // Make sure all linked columns have the same size.
        UnifySameSizedColumnSizes();

        // Distribute the size of each view with a column span > 1.
        for(; view_state_iterator!=view_states_.end(); ++view_state_iterator)
        {
            ViewState* view_state = *view_state_iterator;

            // Update the remaining_width from columns this view_state touches.
            UpdateRemainingWidth(view_state);

            // Distribute the remaining width.
            DistributeRemainingWidth(view_state);

            // Update the size of linked columns.
            // This may need to be combined with previous step.
            UnifySameSizedColumnSizes();
        }
    }
开发者ID:abyvaltsev,项目名称:putty-nd3.x,代码行数:58,代码来源:grid_layout.cpp

示例7: Apply

void MinAggregator::Apply(const Table::Ptr& table, const Value& row)
{
	Column column = table->GetColumn(m_MinAttr);

	Value value = column.ExtractValue(row);

	if (value < m_Min)
		m_Min = value;
}
开发者ID:andrewmeyer,项目名称:icinga2,代码行数:9,代码来源:minaggregator.cpp

示例8: Apply

void AvgAggregator::Apply(const Table::Ptr& table, const Value& row)
{
	Column column = table->GetColumn(m_AvgAttr);

	Value value = column.ExtractValue(row);

	m_Avg += value;
	m_AvgCount++;
}
开发者ID:CSRedRat,项目名称:icinga2,代码行数:9,代码来源:avgaggregator.cpp

示例9: while

void PostgreSqlDbAdapter::ConvertTable(Table* pTab) {
	SerializableList::compatibility_iterator node = pTab->GetFirstChildNode();
	while( node ) {
		if( node->GetData()->IsKindOf( CLASSINFO(Column)) )  {
			Column* col = (Column*) node->GetData();
			col->SetType(ConvertType(col->GetType()));
		}
		node = node->GetNext();
	}
}
开发者ID:kluete,项目名称:codelite,代码行数:10,代码来源:PostgreSqlDbAdapter.cpp

示例10: findColumn

void Table::setPrimaryKey(string colName) {
	
	Column *theCol = findColumn(colName);

	if(theCol == NULL) {
		throw DatabaseException(20, colName + " does not exist.");
	}

	theCol->setPrimary(true);
}
开发者ID:dtracers,项目名称:SchoolWork,代码行数:10,代码来源:Table.cpp

示例11: Apply

void SumAggregator::Apply(const Table::Ptr& table, const Value& row, AggregatorState **state)
{
	Column column = table->GetColumn(m_SumAttr);

	Value value = column.ExtractValue(row);

	SumAggregatorState *pstate = EnsureState(state);

	pstate->Sum += value;
}
开发者ID:dupondje,项目名称:icinga2,代码行数:10,代码来源:sumaggregator.cpp

示例12: GetValue

std::string * Row::GetValue(const std::string & column_name)
{
	Column * col = _tbl->GetColumn(column_name);
	if (!col)
	{
		return nullptr;
	}

	return GetValue(col->GetIndex(), false);
}
开发者ID:hdzz,项目名称:sframe,代码行数:10,代码来源:Table.cpp

示例13: Q_D

/*!
  Returns the data stored in the row in the column named \a column or an invalid
  QVariant if this column does not exist in the table of the row.
  */
QVariant Row::data(const QString &column) const
{
    Q_D(const Row);

    Column *c = d->table->column(column);
    if(!c)
        return QVariant();

    return data(c->index());
}
开发者ID:Kampfgnom,项目名称:LBDatabaseEditor,代码行数:14,代码来源:row.cpp

示例14: Apply

void StdAggregator::Apply(const Table::Ptr& table, const Value& row)
{
	Column column = table->GetColumn(m_StdAttr);

	Value value = column.ExtractValue(row);

	m_StdSum += value;
	m_StdQSum += pow(value, 2);
	m_StdCount++;
}
开发者ID:andrewmeyer,项目名称:icinga2,代码行数:10,代码来源:stdaggregator.cpp

示例15: wxDynamicCast

Column* TableSettings::GetColumn(const wxString& name)
{
    for( SerializableList::iterator it = m_lstColumns.begin();
         it != m_lstColumns.end(); ++it ) {

        Column *c = wxDynamicCast( *it, Column );
        if( c && ( c->GetName() == name ) ) return c;
    }

    return NULL;
}
开发者ID:05storm26,项目名称:codelite,代码行数:11,代码来源:TableSettings.cpp


注:本文中的Column类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。