that I can't remember right now, but I should sync before starting to move files around
again...
return _ircChannel;
}
-void Buffer::setIrcChannel(IrcChannel *ircchan) {
+void Buffer::setIrcChannel(IrcChannel *ircchan) { return;
if(_ircChannel) {
disconnect(_ircChannel, 0, this, 0);
}
_ircChannel = channel;
reset();
if(_ircChannel) {
+ connect(channel, SIGNAL(destroyed()), this, SLOT(setIrcChannel()));
connect(channel, SIGNAL(ircUserJoined(IrcUser *)), this, SLOT(addUser(IrcUser *)));
connect(channel, SIGNAL(ircUserParted(IrcUser *)), this, SLOT(removeUser(IrcUser *)));
connect(channel, SIGNAL(ircUserNickSet(IrcUser *, QString)), this, SLOT(renameUser(IrcUser *)));
addUser(ircuser);
}
}
-
}
QVariant NickModel::headerData(int section, Qt::Orientation orientation, int role) const {
return index.internalId();
}
-void NickModel::addUser(IrcUser *user) {
+void NickModel::addUser(IrcUser *user) { //qDebug() << "adding" << user->nick();
int cat = userCategory(user);
beginInsertRows(createIndex(cat-1, 0, 0), 0, 0);
users[cat-1].prepend(user);
endInsertRows();
}
-void NickModel::removeUser(IrcUser *user) {
+void NickModel::removeUser(IrcUser *user) { //qDebug() << "removing" << user->nick();
// we don't know for sure which category this user was in, so we have to search
QModelIndex index = indexOfUser(user);
removeUser(index);
endRemoveRows();
}
-void NickModel::renameUser(IrcUser *user) {
+void NickModel::renameUser(IrcUser *user) { //qDebug() << "renaming" << user->nick();
QModelIndex index = indexOfUser(user);
emit dataChanged(index, index);
}
int userCategory(IrcUser *) const;
public slots:
- void setIrcChannel(IrcChannel *);
+ void setIrcChannel(IrcChannel *chan = 0);
void addUser(IrcUser *);
void removeUser(IrcUser *);
void removeUser(const QModelIndex &);
void IrcChannel::ircUserDestroyed() {
IrcUser *ircUser = static_cast<IrcUser *>(sender());
Q_ASSERT(ircUser);
+ emit ircUserParted(ircUser);
+ emit ircUserDestroyed(ircUser);
_userModes.remove(ircUser);
}
void ircUserJoined(IrcUser *ircuser);
void ircUserParted(IrcUser *ircuser);
+ void ircUserDestroyed(IrcUser *ircuser);
void ircUserNickSet(IrcUser *ircuser, QString nick);
void ircUserModeAdded(IrcUser *ircuser, QString mode);
void ircUserModeRemoved(IrcUser *ircuser, QString mode);
//if(Qtopia::sandboxDir().isEmpty()) QSettings();
//else QSettings(Qtopia::sandboxDir() + "/etc/QuasselIRC.conf", QSettings::NativeFormat);
// ...so we have to use a workaround:
- /*
QString appPath = QCoreApplication::applicationFilePath();
if(appPath.startsWith(Qtopia::packagePath())) {
QString sandboxPath = appPath.left(Qtopia::packagePath().length() + 32);
QSettings(sandboxPath + "/etc/QuasselIRC.conf", QSettings::IniFormat);
+ qDebug() << sandboxPath + "/etc/QuasselIRC.conf";
} else {
QSettings();
}
- */
- QSettings();
#endif
}
addPage(tr("Queries"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoServers, QList<uint>());
addPage(tr("Nets"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoQueries, QList<uint>());
- connect(Client::bufferModel(), SIGNAL(bufferSelected(Buffer *)), this, SLOT(accept()));
+ //connect(Client::bufferModel(), SIGNAL(bufferSelected(Buffer *)), this, SLOT(accept()));
}
Client::bufferModel()->synchronizeView(view);
ui.tabWidget->addTab(view, title);
}
+
+void BufferViewWidget::accept() {
+ qDebug() << "accepting";
+ QDialog::accept();
+ //hide();
+ qDebug() << "...done.";
+}
public:
BufferViewWidget(QWidget *parent = 0);
- ~BufferViewWidget();
+ virtual ~BufferViewWidget();
+ virtual void accept();
private:
void addPage(const QString &title, const BufferViewFilter::Modes &mode, const QList<uint> &nets);
// at this point, client is fully initialized
void QtopiaMainWin::init() {
Client::signalProxy()->attachSignal(this, SIGNAL(requestBacklog(BufferInfo, QVariant, QVariant)));
- connect(Client::bufferModel(), SIGNAL(bufferSelected(Buffer *)), this, SLOT(showBuffer(Buffer *)));
CoreConnectDlg *dlg = new CoreConnectDlg(this);
//setCentralWidget(dlg);
void QtopiaMainWin::showBuffer(Buffer *b) {
mainWidget->setBuffer(b);
+ bufferViewWidget->hide();
//nickListWidget->
}