FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grid_struct.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include "core.h"
19 #include "grid_numbering.h"
20 
21 namespace qtcore {
22 
24 {
25 public:
26  GridStruct();
27  GridStruct(int rows, int cols);
28 
29  bool isValid() const;
30 
31  int itemCount() const;
32  void setItemCount(int rows, int cols);
33 
34  int rowCount() const;
35  void setRowCount(int count);
36 
37  int columnCount() const;
38  void setColumnCount(int count);
39 
40  const GridNumbering& itemNumbering() const;
41  void setItemNumbering(const GridNumbering& gridNb);
42 
43 private:
44  int m_rowCount;
45  int m_colCount;
46  GridNumbering m_gridNb;
47 };
48 
49 } // namespace qtcore
Represents standard numbering of grid cells.
Definition: grid_numbering.h:24
Basic data for a grid structure : row and column count + cell numbering.
Definition: grid_struct.h:23
#define QTTOOLS_CORE_EXPORT
Definition: core.h:27
Definition: grid_numbering.cpp:19