mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-18 03:29:25 -05:00
add a refresh button to the browse data view
This commit is contained in:
@@ -213,6 +213,10 @@ void Ui_mainForm::retranslateUi(QMainWindow *mainForm)
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
buttonFind->setProperty("whatsThis", QVariant(QApplication::translate("mainForm", "This button toggles the appearance of the Find window, used to search records in the database view", 0, QApplication::UnicodeUTF8)));
|
||||
#endif // QT_NO_WHATSTHIS
|
||||
|
||||
buttonRefresh->setProperty("toolTip", QVariant( QObject::tr("Refresh the data in the selected table.")));
|
||||
buttonRefresh->setProperty("whatsThis", QVariant( QObject::tr("This button refreshes the data in the currently selected table.")));
|
||||
|
||||
buttonNewRecord->setText(QApplication::translate("mainForm", "New Record", 0, QApplication::UnicodeUTF8));
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
buttonNewRecord->setProperty("toolTip", QVariant(QApplication::translate("mainForm", "Insert a new record in the current table", 0, QApplication::UnicodeUTF8)));
|
||||
@@ -801,6 +805,11 @@ void mainForm::browseFindAway()
|
||||
buttonFind->toggle();
|
||||
}
|
||||
|
||||
void mainForm::browseRefresh()
|
||||
{
|
||||
populateTable(comboBrowseTable->currentText());
|
||||
}
|
||||
|
||||
void mainForm::lookfor( const QString & wfield, const QString & woperator, const QString & wsearchterm )
|
||||
{
|
||||
if (!db.isOpen()){
|
||||
|
||||
@@ -101,6 +101,7 @@ public:
|
||||
QLabel *textLabel1;
|
||||
QComboBox *comboBrowseTable;
|
||||
QPushButton *buttonFind;
|
||||
QPushButton *buttonRefresh;
|
||||
QSpacerItem *spacer1;
|
||||
QPushButton *buttonNewRecord;
|
||||
QPushButton *buttonDeleteRecord;
|
||||
@@ -403,6 +404,12 @@ public:
|
||||
|
||||
hboxLayout->addWidget(buttonFind);
|
||||
|
||||
buttonRefresh = new QPushButton(browser);
|
||||
buttonRefresh->setObjectName("buttonRefresh");
|
||||
buttonRefresh->setIcon(QIcon(":/icons/refresh"));
|
||||
|
||||
hboxLayout->addWidget(buttonRefresh);
|
||||
|
||||
spacer1 = new QSpacerItem(51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
hboxLayout->addItem(spacer1);
|
||||
@@ -660,6 +667,7 @@ public:
|
||||
QObject::connect(editGoto, SIGNAL(returnPressed()), mainForm, SLOT(navigateGoto()));
|
||||
QObject::connect(buttonGoto, SIGNAL(clicked()), mainForm, SLOT(navigateGoto()));
|
||||
QObject::connect(buttonFind, SIGNAL(toggled(bool)), mainForm, SLOT(browseFind(bool)));
|
||||
QObject::connect(buttonRefresh, SIGNAL(clicked()), mainForm, SLOT(browseRefresh()));
|
||||
QObject::connect(fileCompactAction, SIGNAL(activated()), mainForm, SLOT(compact()));
|
||||
QObject::connect(editCopyAction, SIGNAL(activated()), mainForm, SLOT(copy()));
|
||||
QObject::connect(editPasteAction, SIGNAL(activated()), mainForm, SLOT(paste()));
|
||||
@@ -754,6 +762,7 @@ public slots:
|
||||
virtual void setRecordsetLabel();
|
||||
virtual void browseFind( bool open );
|
||||
virtual void browseFindAway();
|
||||
virtual void browseRefresh();
|
||||
virtual void lookfor( const QString & wfield, const QString & woperator, const QString & wsearchterm );
|
||||
virtual void showrecord( int dec );
|
||||
virtual void createTable();
|
||||
|
||||
Reference in New Issue
Block a user