git-svn-id: svn://db.shs.com.ru/libs@287 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -25,7 +25,7 @@ if (DEFINED ANDROID_PLATFORM)
|
||||
endif()
|
||||
option(LIB "System install" 1)
|
||||
option(DEBUG "Build with -g3" 0)
|
||||
option(QGLVIEW "Build QGLview library and utils" 0)
|
||||
option(QGLVIEW "Build QGLview library and utils" 1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||
|
||||
@@ -75,7 +75,7 @@ ProjectFilesystemWidget::ProjectFilesystemWidget(QWidget * parent): QWidget(pare
|
||||
buttonCollapse->setIcon(Utils::Icons::COLLAPSE.icon());
|
||||
actionOpen_here->setIcon(Utils::Icons::OPENFILE.icon());
|
||||
actionOpen_external->setIcon(Utils::Icons::OPENFILE.icon());
|
||||
actionShow_external->setIcon(Utils::Icons::DIR.icon());
|
||||
actionShow_external->setIcon(Core::FileIconProvider::icon(QFileIconProvider::Folder));
|
||||
popup_menu.addActions(QList<QAction*>() << actionOpen_here << actionOpen_external << actionShow_external);
|
||||
proj_plug = 0;
|
||||
/*QList<QObject * > plugs = ExtensionSystem::PluginManager::allObjects();
|
||||
@@ -369,7 +369,7 @@ void ProjectFilesystemWidget::on_tree_customContextMenuRequested(const QPoint &
|
||||
|
||||
void ProjectFilesystemWidget::on_actionOpen_here_triggered() {
|
||||
if (menu_target.path().isEmpty()) return;
|
||||
Core::EditorManager::openEditor(menu_target.absoluteFilePath());
|
||||
Core::EditorManager::openEditor(menu_target.absoluteFilePath(), Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</layout>
|
||||
<action name="actionOpen_here">
|
||||
<property name="text">
|
||||
<string>Open here</string>
|
||||
<string>Open as plain</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_external">
|
||||
|
||||
@@ -867,6 +867,16 @@ void SQLTableWidget::addFixedColumnTranslation(const QString & col_name, const Q
|
||||
}
|
||||
|
||||
|
||||
void SQLTableWidget::selectId(int id) {
|
||||
if (!model) return;
|
||||
for (int i = 0; i < model->rowCount(); ++i)
|
||||
if (model->data(model->index(i, 0)).toInt() == id) {
|
||||
ui->view->selectRow(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SQLTableWidget::setAdditionalActions(QList<QAction * > a) {
|
||||
foreach (QAction * i, add_actions)
|
||||
popup_menu.removeAction(i);
|
||||
|
||||
@@ -71,9 +71,9 @@ class SQLQueryModel: public QSqlQueryModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SQLQueryModel(QString & t, QString & conn, QList<ColumnProperties> & cp, QVector<int> & ci, QObject* parent = 0): QSqlQueryModel(parent), table_(t), column_props(cp), column_indexes(ci), conn_name(conn) {;}
|
||||
virtual QVariant data(const QModelIndex & item, int role = Qt::DisplayRole) const;
|
||||
protected:
|
||||
virtual Qt::ItemFlags flags(const QModelIndex & ) const {return (Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable);}
|
||||
virtual QVariant data(const QModelIndex & item, int role = Qt::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex & index, const QVariant& value, int role = Qt::EditRole);
|
||||
int mapColumn(int abs_ind) const {if (abs_ind <= 0 || abs_ind >= column_indexes.size() + 1) return 0; return column_indexes[abs_ind - 1];}
|
||||
QString & table_;
|
||||
@@ -240,6 +240,7 @@ public:
|
||||
void addFixedColumnTranslation(const QString & col_name, const QString & col_tr, const QString & col_tt = QString());
|
||||
void fetchMore() {if (model) model->fetchMore();}
|
||||
void fetchAll() {if (model) while (model->canFetchMore()) model->fetchMore();}
|
||||
void selectId(int id);
|
||||
|
||||
void setAdditionalActions(QList<QAction * > a);
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ void GLVBO::calculateBinormals() {
|
||||
|
||||
|
||||
bool GLVBO::rebuffer(bool clear_) {
|
||||
#if QT_VERSION >= 0x050600
|
||||
initializeOpenGLFunctions();
|
||||
#endif
|
||||
QVector<GLfloat> data;
|
||||
//data.clear();
|
||||
calculateBinormals();
|
||||
|
||||
@@ -293,6 +293,7 @@ void QGLView::paintGL() {
|
||||
//objects_.preparePos(camera());
|
||||
|
||||
static GLRendererBase * prev_rend = 0;
|
||||
glShadeModel(GL_SMOOTH);
|
||||
if (prev_rend != renderer_) {
|
||||
prev_rend = renderer_;
|
||||
if (renderer_ != 0) {
|
||||
|
||||
Reference in New Issue
Block a user