connect (myTrackerCombo, SIGNAL (currentIndexChanged (int)), this, SLOT (onTrackerIndexChanged (int)));
connect (&myFilter, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
connect (&myFilter, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
- connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (onTorrentModelReset ()));
- connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsInserted (QModelIndex, int, int)));
- connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsRemoved (QModelIndex, int, int)));
- connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (onTorrentModelDataChanged (QModelIndex, QModelIndex)));
+ connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (recountSoon ()));
+ connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (recountSoon ()));
+ connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (recountSoon ()));
+ connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (recountSoon ()));
connect (myRecountTimer, SIGNAL (timeout ()), this, SLOT (recount ()));
recountSoon ();
****
***/
-void FilterBar::onTorrentModelReset () { recountSoon (); }
-void FilterBar::onTorrentModelRowsInserted (const QModelIndex&, int, int) { recountSoon (); }
-void FilterBar::onTorrentModelRowsRemoved (const QModelIndex&, int, int) { recountSoon (); }
-void FilterBar::onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&) { recountSoon (); }
-
void
FilterBar::recountSoon ()
{
private:
FilterBarComboBox * createTrackerCombo (QStandardItemModel *);
FilterBarComboBox * createActivityCombo ();
- void recountSoon ();
void refreshTrackers ();
QString getCountString (int n) const;
private slots:
+ void recountSoon ();
void recount ();
void refreshPref (int key);
void refreshCountLabel ();
void onActivityIndexChanged (int index);
void onTrackerIndexChanged (int index);
- void onTorrentModelReset ();
- void onTorrentModelRowsInserted (const QModelIndex&, int, int);
- void onTorrentModelRowsRemoved (const QModelIndex&, int, int);
- void onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&);
void onTextChanged (const QString&);
private: