void CAbstractNonWrappingTextEditorLayout::LinesChanged (unsigned int start_line, unsigned int count) { ASSERT (start_line <= text.GetLinesCount ()); ASSERT (start_line + count <= text.GetLinesCount ()); if (count > 0) RowsChanged (start_line, count); }
PlaylistListModel::PlaylistListModel(QObject* parent) : QStandardItemModel(parent), dropping_rows_(false) { connect(this, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(RowsChanged(QModelIndex, QModelIndex))); connect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)), SLOT(RowsAboutToBeRemoved(QModelIndex, int, int))); connect(this, SIGNAL(rowsInserted(QModelIndex, int, int)), SLOT(RowsInserted(QModelIndex, int, int))); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QFont f("Helvetica",10); this->setFont(f); LifeField = 0; OptionGroup = 0; GroupLayout = 0; isSimulationOn = false; LifeCount = 0; IterationCount = 0; WindowLayout= new QHBoxLayout; QWidget * mycentralwidget = new QWidget; mycentralwidget->setLayout(WindowLayout); this->setCentralWidget(mycentralwidget); this->setWindowTitle("Gra w Życie"); connect(this, SIGNAL(CellsChanged(int,int)), &Algorithm, SLOT(NewDimension(int,int))); connect(&Algorithm, SIGNAL(CellChanged(int,int,bool)),this, SLOT(FeedCell(int,int,bool))); connect(&Algorithm, SIGNAL(ChangeStatus(int,int)), this, SLOT(StatusUpdate(int,int))); connect(this, SIGNAL(CellsChanged(int,int,bool)), &Algorithm, SLOT(CellModified(int,int,bool))); connect(this, SIGNAL(FeedsChanger(int)), &Algorithm, SLOT(FeedsStatus(int))); //connect(&Algorithm, SIGNAL(Clear()),this, SLOT(CleanNow())); InitLifeField(); InitGroupBox(); RowsChanged(); ColumnsChanged(); this->setMinimumSize(700, 480); connect(ColumnChanger, SIGNAL(valueChanged(int)), this, SLOT(ColumnsChanged())); connect(RowChanger, SIGNAL(valueChanged(int)), this, SLOT(RowsChanged())); connect(Quiter, SIGNAL(clicked()), qApp, SLOT(quit())); connect(Generator, SIGNAL(clicked()),this, SLOT(GenerateField()) ); connect(Cleaner, SIGNAL(clicked()),this, SLOT(CleanNow())); connect(LifeField, SIGNAL(cellClicked(int, int)), this, SLOT(FeedCell(int, int))); connect(Starter,SIGNAL(clicked()),this ,SLOT(SimulationTrigger())); connect(OneMove,SIGNAL(clicked()),&Algorithm ,SLOT(SingleStep())); connect(comboBox, SIGNAL(activated(QString)), this, SLOT(Prepared(QString))); connect(this,SIGNAL(StartSimulation()), &Algorithm, SLOT(SetTimer())); connect(this, SIGNAL(StopSimulation()),&Algorithm, SLOT(StopTimer())); qsrand(QTime::currentTime().msecsTo(QTime(0,0,0,0))); }