dbTree ridy

This commit is contained in:
Peter Mash Morgan
2010-10-05 11:04:14 +01:00
parent b1177b30f1
commit 054ca36053
3 changed files with 37 additions and 3 deletions

29
README.txt Normal file
View File

@@ -0,0 +1,29 @@
sqlitebrowser.
This is a fork from the SF project which seems to be stagnant.
Website:
http://sqlitebrowser.sourceforge.net
Project:
https://sourceforge.net/projects/sqlitebrowser/
Have emailed devs and no reply yet.
https://sourceforge.net/projects/sqlitebrowser/forums/forum/301848/topic/3878502
----------------------------------------
Hacking
I'm progressing throught removing Qt3
Adding icons and contect menu
Generally clearing up
Problesm?
Dont get the transactions part..
Help Wanted
Tester co dev (not a qt expert);
contact:
pedromorgan AT gmail DOT com

View File

@@ -181,6 +181,7 @@ void mainForm::fileNew()
}
}
//** Populate DbTree Structure
void mainForm::populateStructure()
{
dbTreeWidget->model()->removeRows(0, dbTreeWidget->model()->rowCount());
@@ -211,6 +212,8 @@ void mainForm::populateStructure()
fldItem->setText( 2, fit.data().gettype() );
fldItem->setIcon(0, QIcon(":/icons/field"));
}
// TODO make an options/setting autoexpand
dbTreeWidget->setItemExpanded(tableItem, true);
}
indexMap::Iterator it2;
indexMap imap = db.idxmap;
@@ -1200,13 +1203,13 @@ void mainForm::updatePreferences()
editWin->setTextFormat(prefForm->defaulttext);
}
//** Db Tree Context Menu
void mainForm::on_tree_context_menu(const QPoint &qPoint){
qDebug("CONTEXT");
if( !dbTreeWidget->selectionModel()->hasSelection() ){
return;
}
QTreeWidgetItem *cItem = dbTreeWidget->currentItem();
if(cItem->text(1) == "table"){
editDeleteTableActionPopup->setDisabled(false);
editModifyTableActionPopup->setDisabled(false);

View File

@@ -319,6 +319,8 @@ public:
headerItem->setText(1, QApplication::translate("mainForm", "Object", 0, QApplication::UnicodeUTF8));
headerItem->setText(2, QApplication::translate("mainForm", "Type", 0, QApplication::UnicodeUTF8));
headerItem->setText(3, QApplication::translate("mainForm", "Schema", 0, QApplication::UnicodeUTF8));
dbTreeWidget->setColumnHidden(1, true);
dbTreeWidget->setColumnWidth(0, 300);
dbTreeWidget->setAlternatingRowColors(true);
dbTreeWidget->setRootIsDecorated(true);
dbTreeWidget->setAnimated(true);
@@ -623,7 +625,7 @@ public:
QObject::connect(fileImportSQLAction, SIGNAL(activated()), mainForm, SLOT(importDatabaseFromSQL()));
QObject::connect(editPreferencesAction, SIGNAL(activated()), mainForm, SLOT(openPreferences()));
QObject::connect(dbTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), mainForm, SLOT(on_tree_context_menu(QPoint)));
QObject::connect(dbTreeWidget, SIGNAL(customContextMenuRequested(const QPoint &)), mainForm, SLOT(on_tree_context_menu(const QPoint &)));
QMetaObject::connectSlotsByName(mainForm);
} // setupUi